.home-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 30px;
}

.home-header h1 {
    font-size: 48px;
    margin: 30px 0 10px 0;
    font-weight: 700;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.02em;
}

.home-header .subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* App Icon for non-session users */
.home-app-icon {
    text-align: center;
}

.app-icon-outlined {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    font-size: 48px;
    border-radius: 18px;
    background: var(--background-color);
    color: var(--off-yellow);
    border: 4px solid var(--off-yellow);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-weight: 900;
    letter-spacing: -0.05em;
}

.app-icon-outlined .letters {
    display: block;
    line-height: 1;
}

.profile-link {
    display: block;
    width: 160px;
    margin-left: auto;
    margin-right: auto;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.profile-link:hover {
    transform: scale(1.02);
}

.home-character-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 4px 4px 2px rgba(0, 0, 0, 0.7);
}

.player-info {
    padding-top: 40px;
    text-align: center;
}

.welcome-back h2 {
    color: #FFFFE0;
    font-size: 24px;
}

.player-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 45px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--off-white);
    margin-top: 5px;
}

/* Main Game Actions */
#main-game-actions {
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

#main-game-actions .btn {
    background: none;
    border: 2px solid;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 175px;
}

#main-game-actions .btn-secondary {
    background-color: var(--pastel-blue);
    border: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#start-new-game-btn {
    margin-top: 50px;
}

#play-ranked-btn {
    margin-top: 20px;
}

#main-game-actions .btn-secondary:hover {
    background-color: #9dd5c6;
    color: #222;
    transform: none !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

#main-game-actions .btn-primary {
    background-color: var(--coral);
    color: #333;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#main-game-actions .btn-primary:hover {
    background-color: #e67e7e;
    color: #333;
    transform: none !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

/* Games List */
.games-list {
    margin-top: 60px;
}

.games-list h3 {
    color: #FFDAB9;
    font-size: 24px;
}

#live-games-container {
    margin-bottom: 80px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3), -1px -1px 3px rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.35), -1px -1px 3px rgba(255, 255, 255, 0.15);
    }
    100% {
        transform: scale(1);
        box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3), -1px -1px 3px rgba(255, 255, 255, 0.1);
    }
}

#live-games-container .game-item {
    border-color: #a4a3a2;
}

/* Add pulse animation to primary buttons in live games */
#live-games-container .btn-primary {
    animation: pulse 2s ease-in-out infinite;
}

#live-games-container .btn-primary:hover {
    animation: none;
}

#active-games-container {
    margin-top: 80px;
}

#completed-games-container {
    margin-top: 80px;
    padding-bottom: 80px;
}

#active-games-container:last-child {
    padding-bottom: 80px;
}

.games-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: none !important;
    align-items: center;
}

.game-item:hover {
    transform: none !important;
    background: transparent !important;
}

.game-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    flex: 1;
}

.game-players {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.team-pill {
    background: rgba(0, 0, 0, 0.1);
    color: var(--off-white);
    font-weight: 500;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    line-height: 1.2;
}


.game-status {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-transform: capitalize;
}

.game-button-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.game-score {
    color: rgba(230, 230, 250, 0.8);
    font-size: 14px;
    font-weight: 500;
}

.game-item .btn-small {
    width: 100%;
    max-width: 110px;
    padding: 12px 20px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.game-item .btn-small:hover {
    transform: none !important;
}

/* Override for non-primary buttons in game items */
.game-item .btn-small:not(.btn-primary) {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--off-white);
}

.game-item .btn-small:not(.btn-primary):hover {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--off-white);
}

/* New Player Section */
.new-player {
    text-align: center;
}

.new-player h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.new-player p {
    font-size: 18px;
    margin-bottom: 30px;
}

.new-player .btn-large {
    margin-top: 45px;
    padding: 18px 40px;
    font-size: 18px;
    background-color: var(--off-yellow);
    border: none;
    border-radius: 30px;
    color: #333;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.new-player .btn-large:hover {
    background-color: var(--off-yellow-darker);
    color: #222;
    transform: none !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}

/* Tournament Banner */
#tournament-banner {
    background-color: rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    /* margin-bottom: 50px; */
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* When profile link comes after tournament banner */
#tournament-banner + .profile-link {
    margin-top: 80px;
}

.tournament-banner-content {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    z-index: 2;
}

.tournament-banner-decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.card-symbol {
    position: absolute;
    font-size: 60px;
    color: rgba(255, 218, 185, 0.1);
    font-weight: 400;
}

.card-symbol:nth-child(1) {
    top: 10px;
    left: 10%;
    transform: rotate(-15deg);
}

.card-symbol:nth-child(2) {
    top: 40px;
    right: 15%;
    transform: rotate(20deg);
}

.card-symbol:nth-child(3) {
    bottom: 20px;
    left: 20%;
    transform: rotate(-10deg);
}

.card-symbol:nth-child(4) {
    bottom: 10px;
    right: 10%;
    transform: rotate(15deg);
}

.tournament-banner-headline {
    color: var(--off-yellow);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.tournament-banner-subtext {
    margin: 0 0 25px 0;
}

.subtext-item {
    display: block;
    color: var(--off-white);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.prize-amount {
    background: linear-gradient(90deg, var(--coral), var(--off-yellow), var(--coral));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    animation: gradient-shift 3s ease infinite;
}

.btn-tournament-cta {
    background-color: var(--pastel-blue);
    color: #333;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: inline-block;
}

.btn-tournament-cta:hover {
    background-color: var(--pastel-blue-darker);
    color: #222;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

/* Username Link */
.username-link {
    text-decoration: underline;
    cursor: pointer;
    position: relative;
}

.username-link:hover {
    text-decoration: underline;
}

/* Username Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop.active {
    display: flex;
}

.modal-header {
    margin-bottom: 24px;
}

.modal-title {
    color: var(--off-yellow);
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--off-white);
    opacity: 0.8;
}

.modal-body {
    margin-bottom: 28px;
}

.modal-description {
    font-size: 15px;
    color: var(--off-white);
    opacity: 0.8;
    margin-bottom: 24px;
    line-height: 1.5;
    width: 210px;
    margin-left: auto;
    margin-right: auto;
}

.email-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: var(--off-white);
    font-size: 16px;
    transition: all 0.2s ease;
}

.email-input::placeholder {
    color: var(--off-white);
    opacity: 0.5;
}

.email-input:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.15);
}

.email-input.error {
    border-color: #ff6b6b;
}

.email-error {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
    text-align: left;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.modal-btn.btn-primary {
    background: var(--pastel-blue);
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.modal-btn.btn-primary:hover {
    background: var(--pastel-blue-darker);
    color: #222;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.modal-btn.btn-secondary {
    background: rgba(0, 0, 0, 0.2);
    color: var(--off-white);
    border: none;
}

.modal-btn.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.3);
    color: var(--off-white);
}

/* Responsive Design */

@media (min-width: 600px) {
    .subtext-item {
        display: inline;
    }

    .subtext-item:not(:last-child)::after {
        content: " • ";
        color: var(--off-white);
        margin: 0 5px;
    }
}

/* Mobile-first: Default styles are for small screens */
.modal-title {
    font-size: 20px;
}

.modal-subtitle {
    font-size: 14px;
}

.modal-actions {
    flex-direction: column;
    width: 100%;
}

.modal-btn {
    width: 100%;
}

@media (min-width: 768px) {
    .game-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        width: 580px;
        margin: 0 auto;
    }

    .game-details {
        align-items: flex-start;
        text-align: left;
    }

    .game-players {
        flex-direction: row;
        gap: 6px;
        align-items: center;
    }

    .game-item .btn-small {
        width: auto;
        padding: 8px 20px;
    }

    /* Modal styles - Tablet and up */
    .modal-title {
        font-size: 24px;
    }

    .modal-subtitle {
        font-size: 16px;
    }

    .modal-btn {
        width: auto;
    }

    /* Tournament Banner - Tablet */
    #tournament-banner {
        padding: 40px 20px;
    }

    .tournament-banner-headline {
        font-size: 28px;
    }

    .tournament-banner-subtext {
        font-size: 18px;
    }

    .btn-tournament-cta {
        font-size: 16px;
        padding: 14px 32px;
    }

    .card-symbol {
        font-size: 80px;
    }
}

@media (min-width: 1024px) {
    /* Tournament Banner - Desktop */
    #tournament-banner {
        padding: 50px 20px;
    }

    .tournament-banner-content {
        max-width: 800px;
    }

    .tournament-banner-headline {
        font-size: 24px;
    }

    .tournament-banner-subtext {
        font-size: 22px;
    }

    .card-symbol {
        font-size: 100px;
    }
}