/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
}

/* Auth styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
}

.auth-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
}

.tab-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    opacity: 1;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-help {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
    font-style: italic;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    border: none;
    border-radius: 8px;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00cc6a 0%, #00ff88 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.error {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 68, 68, 0.2);
    font-size: 0.95rem;
}

.success {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 255, 136, 0.2);
    font-size: 0.95rem;
}

/* Game interface styles */
.game-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.game-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logout-btn {
    color: #ff4444;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 68, 68, 0.1);
}

.game-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.welcome-message {
    text-align: center;
    padding: 2rem;
}

.game-footer {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.main-nav {
    display: flex;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: #fff;
    padding: 0.5rem 1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-btn:hover, .nav-btn.active {
    opacity: 1;
}

.nav-btn .icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.nav-btn .label {
    font-size: 0.875rem;
}

.section-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #00ff88;
}

.form-group input:invalid {
    border-color: rgba(255, 68, 68, 0.5);
}

.profile-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.profile-info p {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-info p:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.profile-info strong {
    color: #00ff88;
    margin-right: 0.5rem;
}

/* Rooms Menu Styles */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.room-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(5px);
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3);
    border-color: #ff00ff;
}

.room-icon {
    font-size: 48px;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.room-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ff00ff;
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
}

.room-description {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Room View Styles */
.room-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
    background: #1a1a1a;
}

.isometric-grid {
    position: absolute;
    transform: rotateX(60deg) rotateZ(-45deg);
    transform-style: preserve-3d;
    transform-origin: center center;
    transition: all 0.3s ease;
}

.tile {
    position: absolute;
    background-size: cover;
    cursor: pointer;
    transition: all 0.2s ease;
    image-rendering: pixelated;
}

.tile:hover {
    filter: brightness(1.2) drop-shadow(0 0 5px rgba(255, 0, 255, 0.5));
}

.tile.wall {
    z-index: 1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.player {
    position: absolute;
    background: #ff00ff;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease-out;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.player::after {
    content: attr(data-username);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    color: white;
    text-shadow: 0 0 5px #ff00ff;
    font-size: 0.8em;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #ff00ff;
    font-size: 1.2em;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
} 