/* ZeroTrace - Modern Card Game Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Auth Section */
#auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    width: 100%;
}

.auth-container h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-container h1 i {
    margin-right: 10px;
}

.subtitle {
    color: #b8b8b8;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 5px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.tab-btn i {
    margin-right: 8px;
}

.tab-btn.active {
    background: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #b8b8b8;
    z-index: 1;
}

.auth-form input {
    padding: 15px 15px 15px 45px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.auth-form input::placeholder {
    color: #b8b8b8;
}

.auth-form input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.auth-form button {
    padding: 15px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.auth-form button i {
    margin-right: 8px;
}

.auth-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

/* Game Section */
#game-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-header h2 {
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-header h2 i {
    margin-right: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

#logout-btn {
    padding: 8px 16px;
    background: rgba(255, 107, 107, 0.3);
    border: 1px solid rgba(255, 107, 107, 0.5);
    border-radius: 8px;
    color: #ff6b6b;
    cursor: pointer;
    transition: all 0.3s ease;
}

#logout-btn i {
    margin-right: 8px;
}

#logout-btn:hover {
    background: rgba(255, 107, 107, 0.5);
}

.game-container {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-panel h3 {
    margin-bottom: 20px;
    color: #00d4ff;
}

.game-panel h3 i {
    margin-right: 10px;
}

.lobby-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.lobby-controls button {
    padding: 12px 24px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.lobby-controls button i {
    margin-right: 8px;
}

.lobby-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

.games-list h4 {
    margin-bottom: 15px;
    color: #00d4ff;
}

.games-list h4 i {
    margin-right: 8px;
}

.game-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.game-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.5);
}

.join-game-btn {
    padding: 8px 16px;
    background: rgba(0, 212, 255, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 6px;
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.join-game-btn:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* Game Board */
.game-info {
    text-align: center;
    margin-bottom: 30px;
}

.game-info h3 {
    color: #00d4ff;
    margin-bottom: 15px;
}

.game-info h3 i {
    margin-right: 10px;
}

.game-status {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    color: #b8b8b8;
}

.game-status i {
    margin-right: 5px;
}

.game-area {
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 30px;
    min-height: 400px;
}

.opponent-area, .player-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.area-label {
    text-align: center;
    color: #00d4ff;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 10px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.area-label i {
    margin-right: 8px;
}

.opponent-hand, .player-hand {
    min-height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8b8b8;
    padding: 10px;
    flex-wrap: wrap;
}

.opponent-play-area, .player-play-area {
    min-height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8b8b8;
    padding: 10px;
    flex-wrap: wrap;
}

.placeholder-text {
    text-align: center;
    color: #b8b8b8;
    font-style: italic;
}

.placeholder-text i {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
    color: #00d4ff;
}

.center-area {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ice-area {
    min-height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8b8b8;
    width: 200px;
    text-align: center;
}

.player-stats {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats, .deck-info {
    display: flex;
    gap: 20px;
}

.stats span, .deck-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats i, .deck-info i {
    color: #00d4ff;
}

/* Enhanced Cards */
.card {
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    margin: 5px;
    min-width: 90px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #ff6b6b, #00d4ff);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6);
    border-color: #00d4ff;
}

.card-name {
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.2;
    color: #ffffff;
}

.card-type {
    font-size: 0.7rem;
    color: #00d4ff;
    text-align: center;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-cost {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    align-self: flex-end;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-strength {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 107, 107, 0.8);
    color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.card-influence {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 193, 7, 0.8);
    color: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Card Back (for opponent) */
.card.card-back {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    border-color: rgba(0, 212, 255, 0.3);
}

.card.card-back::before {
    background: linear-gradient(90deg, #00d4ff, #0099cc, #00d4ff);
}

.card.card-back .card-name {
    color: #00d4ff;
    font-size: 0.8rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: 20px;
    text-align: center;
    color: #00d4ff;
}

.modal-content h3 i {
    margin-right: 8px;
}

.modal-content .input-group {
    margin-bottom: 20px;
}

.modal-content .input-group input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
}

.modal-content .input-group .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #b8b8b8;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.modal-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.modal-buttons button i {
    margin-right: 8px;
}

.modal-buttons button[type="submit"] {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: #ffffff;
}

.modal-buttons .cancel-btn {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.5);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .game-container {
        padding: 15px;
    }
    
    .game-panel {
        padding: 20px 15px;
    }
    
    .player-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats, .deck-info {
        justify-content: space-between;
    }
    
    .card {
        min-width: 70px;
        min-height: 110px;
        padding: 8px;
    }
    
    .card-name {
        font-size: 0.75rem;
    }
    
    .lobby-controls {
        flex-direction: column;
    }
    
    .game-area {
        gap: 15px;
    }
}
