.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    gap: 3rem;
    color: #fff;
}

/* PROFIL KARTA */
.profile-card {
    background: #1b1b1b;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    width: 280px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.8s ease;
}

.profile-card h2,
.profile-card p {
    margin: 0.6rem 0;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #ffcc00;
}

/* STATISTIKY */
.statistics h2 {
    margin-bottom: 1rem;
    text-align: center;
}
.statistics {
    text-align: center; /* ensure entire stat section is centered */
}

.stats-box {
    display: flex;
    gap: 1.5rem;
    background: #222;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.stat h2 {
    color: #ffcc00;
    font-size: 2rem;
}

/* TABULKA */
.game-history {
    width: 90%;
    max-width: 700px;
    text-align: center;
}

.game-history table {
    width: 100%;
    border-collapse: collapse;
    background: #1b1b1b;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.game-history th {
    background: #ffcc00;
    color: #111;
    padding: 0.7rem;
}

.game-history td {
    padding: 0.6rem;
    border-top: 1px solid #333;
}

/* PŘÁTELÉ */
.friends {
    text-align: center;
}

.friends-list {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.friend {
    text-align: center;
    background: #1b1b1b;
    padding: 1rem;
    border-radius: 10px;
    width: 120px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    transition: 0.3s;
}

.friend:hover {
    transform: scale(1.05);
}

.friend-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.4rem;
}

.add-friend {
    display: flex;
    gap: 0.7rem;
    margin-top: 1rem;
}

.add-friend input {
    padding: 0.6rem;
    border-radius: 6px;
    border: 2px solid #333;
    background: #111;
    color: #fff;
    font-family: inherit;
    width: 200px;
}

.add-friend input:focus {
    border-color: #ffcc00;
    outline: none;
}

.add-friend .btn-main {
    padding: 0.6rem 1rem;
}

/* PENDING REQUESTS SECTION */
.pending-requests-section {
    margin-top: 2rem;
    width: 90%;
    max-width: 600px;
}

.pending-requests-section h3 {
    margin-bottom: 1rem;
    color: #ffcc00;
}

.friend-requests-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.friend-request {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1b1b1b;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    border-left: 4px solid #ffcc00;
}

.request-info {
    flex: 1;
}

.request-info p {
    margin: 0;
    font-weight: 500;
    color: #fff;
}

.request-info small {
    display: block;
    margin-top: 0.3rem;
    color: #aaa;
    font-size: 0.85rem;
}

.request-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-accept,
.btn-decline {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.85rem;
}

.btn-accept {
    background: #4caf50;
    color: #fff;
}

.btn-accept:hover {
    background: #45a049;
    transform: scale(1.05);
}

.btn-decline {
    background: #f44336;
    color: #fff;
}

.btn-decline:hover {
    background: #da190b;
    transform: scale(1.05);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ANIMACE */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* MODALS */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #1b1b1b;
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid #333;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.game-modal-content {
    max-width: 600px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #ffcc00;
}

/* GAME STATS */
.game-stats-section {
    margin-bottom: 2rem;
}

.game-stats-section h3 {
    color: #ffcc00;
    margin-bottom: 1rem;
    text-align: center;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    background: #111;
    padding: 1rem;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-item span {
    display: block;
    font-size: 2rem;
    color: #ffcc00;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #ccc;
}

/* GAME AREA */
.game-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.current-game-status {
    text-align: center;
    background: #222;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ffcc00;
}

.current-game-status p {
    margin: 0;
    color: #fff;
}

.game-choices {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.choice-btn {
    padding: 1rem 1.2rem;
    border: 2px solid #ffcc00;
    background: #111;
    color: #ffcc00;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: 0.3s;
    font-family: inherit;
}

.choice-btn:hover {
    background: #ffcc00;
    color: #111;
    transform: scale(1.05);
}

.choice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-result {
    background: #222;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #4caf50;
}

.game-result p {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #fff;
}

.game-result .btn-main {
    width: 100%;
}

.waiting-message {
    background: #222;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #ffcc00;
}

.waiting-message p {
    margin: 0;
    color: #ffcc00;
    font-weight: 500;
}

/* CHOICE DISPLAY */
.choice-display {
    background: #222;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #ffcc00;
    margin-bottom: 1rem;
}

.choice-display p {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-weight: 500;
}

.choice-icon {
    font-size: 3rem;
    display: inline-block;
    animation: pulse 2s infinite;
}

/* RESULT ANIMATION */
.result-animation {
    margin-bottom: 1.5rem;
}

.choices-comparison {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    animation: slideIn 0.8s ease-out;
}

.player-choice,
.opponent-choice {
    text-align: center;
    flex: 1;
}

.player-choice p,
.opponent-choice p {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-weight: 500;
}

.vs-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffcc00;
    animation: bounce 1s ease-in-out;
}

.result-text {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 1rem 0;
    animation: fadeInScale 0.6s ease-out 0.8s both;
}

/* ANIMATIONS */
@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Make friend clickable */
.friend {
    cursor: pointer;
}

.friend.clickable:hover {
    background: #2a2a2a;
    transform: scale(1.08);
}
