:root {
    --primary: #0a0a0a;
    --secondary: #fefefe;
    --accent: #ff3366;
    --accent-dark: #cc0033;
    --gold: #ffd700;
    --emerald: #00d9a3;
    --purple: #9333ea;
    --blue: #0ea5e9;
    --border: #2a2a2a;
    --shadow: rgba(0, 0, 0, 0.4);

    /* Pride Colors */
    --pride-red: #e40303;
    --pride-orange: #ff8c00;
    --pride-yellow: #ffed00;
    --pride-green: #008026;
    --pride-blue: #24408e;
    --pride-purple: #732982;
    --trans-pink: #f5a9b8;
    --trans-blue: #5bcefa;
    --trans-white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--primary);
    color: var(--secondary);
    overflow-x: hidden;
}

.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 51, 102, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 217, 163, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(147, 51, 234, 0.08) 0%, transparent 50%);
    animation: bgFloat 30s ease-in-out infinite;
}

@keyframes bgFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-5%, 5%) rotate(2deg);
    }

    66% {
        transform: translate(5%, -5%) rotate(-2deg);
    }
}

.grain {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noise)" opacity="0.05"/%3E%3C/svg%3E');
    pointer-events: none;
    opacity: 0.4;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
}

/* LOGIN SCREEN */
#loginScreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-wrapper {
    max-width: 500px;
    width: 100%;
}

.brand {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-title {
    font-family: 'Syne', sans-serif;
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, var(--accent), var(--emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.brand-tagline {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.login-box {
    background: rgba(255, 255, 255, 0.03);
    border: 3px solid var(--border);
    padding: 3rem;
    box-shadow:
        0 20px 60px var(--shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.form-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border);
    color: var(--secondary);
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 0 4px rgba(255, 51, 102, 0.1);
}

.btn {
    width: 100%;
    padding: 1.4rem;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-loading {
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-top: -12px;
    margin-left: -12px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 1.2rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    color: var(--accent);
    transform: scale(1.1);
}

/* Character Selection Feedback */
.trait-option.selected {
    border-color: var(--accent);
    background: rgba(255, 51, 102, 0.1);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.2);
    transform: translateY(-5px);
}

.btn-primary {
    background: var(--accent);
    color: white;
    margin-bottom: 1rem;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 51, 102, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--secondary);
}

.btn-secondary:hover {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-google {
    background: white;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    border: none;
}

.btn-google:hover {
    background: #f1f1f1;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}


/* GAME SCREEN */
#gameScreen {
    display: none;
    min-height: 100vh;
}

.game-header {
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 3px solid var(--border);
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.header-brand {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.global-time {
    text-align: center;
}

.time-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.3rem;
}

.time-display {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--emerald);
    font-weight: 700;
}

.date-display {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.2rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-logout {
    padding: 0.8rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    color: var(--secondary);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    border-color: var(--accent);
    background: rgba(255, 51, 102, 0.1);
    transform: translateY(-2px);
}

.game-layout {
    display: grid;
    grid-template-columns: 380px 1fr 380px;
    gap: 2rem;
    padding: 2rem;
    max-width: 1800px;
    margin: 0 auto;
}

/* PANELS */
.panel {
    background: rgba(255, 255, 255, 0.02);
    border: 3px solid var(--border);
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 120px;
    box-shadow: 0 10px 40px var(--shadow);
}

.panel-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--border);
}

.character-avatar {
    width: 180px;
    height: 180px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border: 4px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    box-shadow: 0 15px 50px var(--shadow);
    position: relative;
}

.character-avatar::after {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.character-name {
    font-family: 'Syne', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.character-age {
    text-align: center;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.life-stage-badge {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 auto 2rem;
    display: block;
    text-align: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.stat-section {
    margin-bottom: 2.5rem;
}

.stat-section-title {
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
}

.stat-item {
    margin-bottom: 1.5rem;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    align-items: center;
}

.stat-name {
    font-weight: 700;
    font-size: 1rem;
}

.stat-value {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
}

.stat-bar-container {
    height: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.stat-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.stat-bar-fill.health {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.stat-bar-fill.happiness {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stat-bar-fill.intelligence {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.stat-bar-fill.social {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.stat-bar-fill.fitness {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.money-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(0, 217, 163, 0.1));
    border: 3px solid var(--gold);
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.money-amount {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.money-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
}

/* MAIN CONTENT */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.content-card {
    background: rgba(255, 255, 255, 0.02);
    border: 3px solid var(--border);
    padding: 2.5rem;
    box-shadow: 0 10px 40px var(--shadow);
}

.content-card-title {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--accent), var(--emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-box {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border);
    padding: 1.5rem;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.info-value {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
}

/* TABS */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--border);
    flex-wrap: wrap;
}

.tab {
    padding: 1.2rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 4px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -3px;
}

.tab:hover {
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.03);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ACTION GRID */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: rgba(255, 255, 255, 0.03);
    border: 3px solid var(--border);
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 51, 102, 0.1), transparent);
    transition: left 0.5s;
}

.action-card:hover::before {
    left: 100%;
}

.action-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(255, 51, 102, 0.3);
}

.action-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.action-card.disabled:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
}

.action-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.action-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.action-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.action-cooldown {
    font-family: 'DM Serif Display', serif;
    font-size: 0.9rem;
    color: var(--gold);
    font-style: italic;
}

.action-cost {
    font-weight: 700;
    color: var(--accent);
}

/* ACTIVITY FEED */
.activity-feed {
    max-height: 700px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.activity-feed::-webkit-scrollbar {
    width: 8px;
}

.activity-feed::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.activity-feed::-webkit-scrollbar-thumb {
    background: var(--accent);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.activity-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--emerald);
    padding: 1.5rem;
    margin-bottom: 1rem;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.activity-time {
    font-family: 'DM Serif Display', serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.activity-text {
    font-size: 1.05rem;
    line-height: 1.6;
}

.activity-item.important {
    border-left-color: var(--gold);
    background: rgba(255, 215, 0, 0.05);
}

.activity-item.critical {
    border-left-color: var(--accent);
    background: rgba(255, 51, 102, 0.05);
}

/* CHAT SYSTEM */
.chat-messages {
    height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.chat-msg {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.chat-msg.sent {
    align-self: flex-end;
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-msg.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-bottom-left-radius: 2px;
}

.chat-input-wrap {
    display: flex;
    gap: 0.5rem;
}

.chat-scenes {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.btn-scene {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-scene:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.asset-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.3rem 0.6rem;
    background: var(--emerald);
    color: black;
    letter-spacing: 0.05em;
}

.player-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    transition: all 0.3s;
}

.player-card:hover {
    border-color: var(--accent);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    font-size: 2rem;
}

.player-name {
    font-weight: 800;
    font-size: 1.1rem;
}

.player-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.activity-item.social {
    border-left-color: var(--purple);
    background: rgba(147, 51, 234, 0.05);
}

/* PLAYER LIST */
.player-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border);
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.player-card:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.player-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.player-info {
    flex: 1;
}

.player-name {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.player-details {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.player-status {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 217, 163, 0.2);
    border: 2px solid var(--emerald);
    color: var(--emerald);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.player-status.offline {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.5);
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--primary);
    border: 4px solid var(--border);
    padding: 3rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 100px var(--shadow);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--border);
}

.modal-title {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent), var(--emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-close {
    background: none;
    border: none;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    width: 50px;
    height: 50px;
}

.modal-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-body {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* LOADING */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2rem;
}

.loading.active {
    display: flex;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* NOTIFICATIONS */
.notification {
    position: fixed;
    top: 120px;
    right: 2rem;
    background: rgba(10, 10, 10, 0.98);
    border: 3px solid var(--border);
    padding: 1.5rem 2rem;
    min-width: 350px;
    max-width: 450px;
    box-shadow: 0 20px 60px var(--shadow);
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    backdrop-filter: blur(20px);
}

.notification.success {
    border-left: 6px solid var(--emerald);
}

.notification.error {
    border-left: 6px solid var(--accent);
}

.notification.warning {
    border-left: 6px solid var(--gold);
}

.notification-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.notification-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* CHARACTER CREATION */
.creation-step {
    display: none;
}

.creation-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.trait-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

@media (max-width: 900px) {
    .trait-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .trait-grid {
        grid-template-columns: 1fr;
    }
}

.trait-option {
    background: rgba(255, 255, 255, 0.03);
    border: 3px solid var(--border);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trait-option:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.trait-option.selected {
    border-color: var(--emerald);
    background: rgba(0, 217, 163, 0.1);
}

/* Pride effect for LGBT+ gender selections */
.trait-option.selected#gender-non-binary,
.trait-option.selected#gender-genderfluid,
.trait-option.selected#gender-transgender-male,
.trait-option.selected#gender-transgender-female,
.trait-option.selected#gender-agender,
.trait-option.selected#gender-other {
    border-color: transparent;
    border-image: linear-gradient(135deg,
            var(--pride-red),
            var(--pride-orange),
            var(--pride-yellow),
            var(--pride-green),
            var(--pride-blue),
            var(--pride-purple)) 1;
    background: linear-gradient(135deg,
            rgba(228, 3, 3, 0.1),
            rgba(255, 140, 0, 0.1),
            rgba(255, 237, 0, 0.1),
            rgba(0, 128, 38, 0.1),
            rgba(36, 64, 142, 0.1),
            rgba(115, 41, 130, 0.1));
    animation: prideGlow 3s ease-in-out infinite;
}

@keyframes prideGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(228, 3, 3, 0.3);
    }

    16% {
        box-shadow: 0 0 20px rgba(255, 140, 0, 0.3);
    }

    33% {
        box-shadow: 0 0 20px rgba(255, 237, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 128, 38, 0.3);
    }

    66% {
        box-shadow: 0 0 20px rgba(36, 64, 142, 0.3);
    }

    83% {
        box-shadow: 0 0 20px rgba(115, 41, 130, 0.3);
    }
}

.trait-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.trait-name {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    line-height: 1.2;
}

.trait-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

/* RESPONSIVE */

/* Tablets e telas médias */
@media (max-width: 1400px) {
    .game-layout {
        grid-template-columns: 1fr;
    }

    .panel {
        position: relative;
        top: 0;
    }
}

/* Tablets pequenos e celulares grandes */
@media (max-width: 768px) {

    /* Login Screen */
    #loginScreen {
        padding: 1rem;
    }

    .brand {
        margin-bottom: 2rem;
    }

    .brand-title {
        font-size: 2.8rem;
    }

    .brand-tagline {
        font-size: 1rem;
    }

    .login-box {
        padding: 1.5rem;
        border-width: 2px;
    }

    .form-input {
        padding: 1rem;
        font-size: 1rem;
    }

    .btn {
        padding: 1.2rem;
        font-size: 1rem;
    }

    /* Game Header */
    .game-header {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1rem;
        gap: 1rem;
        position: relative;
    }

    .header-brand {
        font-size: 1.5rem;
    }

    .time-display {
        font-size: 1.5rem;
    }

    .date-display {
        font-size: 0.8rem;
    }

    .header-user {
        justify-content: center;
        flex-direction: column;
        gap: 0.8rem;
    }

    .user-name {
        font-size: 1rem;
    }

    .btn-logout {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Game Layout */
    .game-layout {
        padding: 1rem;
        gap: 1rem;
    }

    .panel {
        padding: 1.5rem;
        border-width: 2px;
    }

    .panel-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.8rem;
        border-width: 2px;
    }

    /* Character Card */
    .character-avatar {
        width: 120px;
        height: 120px;
        font-size: 4rem;
        border-width: 3px;
        margin-bottom: 1.5rem;
    }

    .character-name {
        font-size: 1.5rem;
    }

    .character-age {
        font-size: 0.9rem;
    }

    .life-stage-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }

    /* Stats */
    .stat-section {
        margin-top: 1.5rem;
    }

    .stat-section-title {
        font-size: 0.8rem;
    }

    .stat-item {
        margin-bottom: 1.2rem;
    }

    .stat-name {
        font-size: 0.85rem;
    }

    .stat-value {
        font-size: 0.85rem;
    }

    .stat-bar-container {
        height: 10px;
    }

    /* Money Card */
    .money-card {
        padding: 1.2rem;
    }

    .money-amount {
        font-size: 1.8rem;
    }

    .money-label {
        font-size: 0.75rem;
    }

    /* Content Card */
    .content-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-width: 2px;
    }

    .content-card-title {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }

    /* Info Grid */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .info-box {
        padding: 1rem;
    }

    .info-label {
        font-size: 0.75rem;
    }

    .info-value {
        font-size: 1rem;
    }

    /* Tabs */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.3rem;
        margin-bottom: 1.5rem;
        scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab {
        padding: 0.9rem 1.2rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Action Grid */
    .action-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .action-btn {
        padding: 1.2rem;
    }

    .action-icon {
        font-size: 2rem;
    }

    .action-name {
        font-size: 0.9rem;
    }

    .action-desc {
        font-size: 0.8rem;
    }

    .action-cost {
        font-size: 0.75rem;
    }

    .action-cooldown {
        font-size: 0.75rem;
    }

    /* Activity Feed */
    .activity-feed {
        max-height: 400px;
    }

    .activity-item {
        padding: 1rem;
        margin-bottom: 0.8rem;
    }

    .activity-text {
        font-size: 0.9rem;
    }

    .activity-time {
        font-size: 0.75rem;
    }

    /* Player List */
    .player-card {
        padding: 1rem;
    }

    .player-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }

    .player-name {
        font-size: 0.95rem;
    }

    .player-details {
        font-size: 0.8rem;
    }

    .player-status {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    /* Modal */
    .modal {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
        border-width: 3px;
    }

    .modal-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-width: 2px;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .modal-title {
        font-size: 1.5rem;
        flex: 1 1 100%;
    }

    .modal-close {
        font-size: 2.5rem;
        width: 40px;
        height: 40px;
        position: absolute;
        right: 1rem;
        top: 1rem;
    }

    .modal-body {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .modal-buttons {
        gap: 0.8rem;
    }

    .modal-buttons .btn {
        font-size: 0.9rem;
        padding: 1rem;
    }

    /* Notification */
    .notification {
        right: 1rem;
        left: 1rem;
        min-width: auto;
        padding: 1rem 1.5rem;
        top: 100px;
    }

    .notification-title {
        font-size: 1rem;
    }

    .notification-message {
        font-size: 0.9rem;
    }

    /* Loading */
    .loading-spinner {
        width: 60px;
        height: 60px;
        border-width: 4px;
    }

    .loading-text {
        font-size: 1.2rem;
    }

    /* Character Creation */
    .trait-icon {
        font-size: 2rem;
    }

    .trait-name {
        font-size: 0.85rem;
    }

    .trait-desc {
        font-size: 0.85rem;
    }

    .trait-option {
        padding: 1.2rem 0.8rem;
    }
}

/* Celulares pequenos */
@media (max-width: 480px) {

    /* Login */
    .brand-title {
        font-size: 2.2rem;
    }

    .brand-tagline {
        font-size: 0.9rem;
    }

    .login-box {
        padding: 1.2rem;
    }

    .form-input {
        padding: 0.9rem;
        font-size: 0.95rem;
    }

    .btn {
        padding: 1.1rem;
        font-size: 0.95rem;
    }

    /* Header */
    .header-brand {
        font-size: 1.3rem;
    }

    .time-display {
        font-size: 1.3rem;
    }

    .time-label {
        font-size: 0.7rem;
    }

    /* Character */
    .character-avatar {
        width: 100px;
        height: 100px;
        font-size: 3.5rem;
    }

    .character-name {
        font-size: 1.3rem;
    }

    /* Panels */
    .panel {
        padding: 1rem;
    }

    .content-card {
        padding: 1rem;
    }

    .content-card-title {
        font-size: 1.1rem;
    }

    /* Tabs */
    .tab {
        padding: 0.8rem 1rem;
        font-size: 0.75rem;
    }

    /* Modal */
    .modal-content {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .modal-close {
        font-size: 2rem;
        width: 35px;
        height: 35px;
    }

    .modal-body {
        font-size: 0.95rem;
    }

    /* Info Grid */
    .info-value {
        font-size: 0.95rem;
    }

    /* Stats */
    .stat-bar-container {
        height: 8px;
    }
}

/* Celulares muito pequenos */
@media (max-width: 360px) {
    .brand-title {
        font-size: 2rem;
    }

    .header-brand {
        font-size: 1.1rem;
    }

    .character-avatar {
        width: 90px;
        height: 90px;
        font-size: 3rem;
    }

    .character-name {
        font-size: 1.2rem;
    }

    .panel {
        padding: 0.8rem;
    }

    .content-card {
        padding: 0.8rem;
    }

    .tab {
        padding: 0.7rem 0.8rem;
        font-size: 0.7rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }
}

/* Landscape em celulares */
@media (max-height: 600px) and (orientation: landscape) {
    .character-avatar {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .stat-section {
        margin-top: 1rem;
    }

    .stat-item {
        margin-bottom: 0.8rem;
    }

    .panel {
        padding: 1rem;
    }

    .content-card {
        padding: 1rem;
    }

    .activity-feed {
        max-height: 250px;
    }
}

/* MOBILE NAVIGATION */
.bottom-nav {
    display: none;
    /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom));
    z-index: 1000;
    justify-content: space-around;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.nav-item {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-item.active {
    color: var(--accent);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }

    .game-layout {
        display: block;
        /* Override grid */
        padding-bottom: 100px;
    }

    /* Mobile Panel Visibility Logic */
    .panel,
    .main-content {
        display: none !important;
        /* Force hide */
    }

    .panel.mobile-active,
    .main-content.mobile-active {
        display: block !important;
        animation: fadeIn 0.3s ease;
    }
}

/* SOCIAL & SEARCH ENHANCEMENTS */
.search-container {
    position: relative;
    width: 100%;
}

.search-container input {
    width: 100%;
    padding: 1rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.2);
}

#friendsListSection h3,
#searchResultsSection h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.player-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.player-avatar {
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 1px solid var(--border);
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.player-details {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .player-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .player-avatar {
        margin: 0 auto;
    }

    .player-card .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

.app-footer {
    padding: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border-top: 2px solid var(--border);
    margin-top: 4rem;
    position: relative;
    z-index: 2;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(10px);
}

.app-footer p {
    margin: 0;
}