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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    text-align: center;
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin-bottom: 40px;
}

input[type="number"] {
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
}

input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

input[type="number"]:hover {
    border-color: #764ba2;
}

.honeycomb-container {
    position: relative;
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.frame {
    position: absolute;
    width: 400px;
    height: 200px;
    border: 3px solid #333;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    background: transparent;
    z-index: 1;
}

.circles-container {
    position: relative;
    width: 400px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.circles-container.active {
    opacity: 1;
}

.honeycomb-circle {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    box-shadow: 0 4px 15px rgba(255, 183, 0, 0.3);
    opacity: 0;
    transform: scale(0) rotate(0deg);
    animation: popIn 0.5s ease forwards;
    transition: all 0.3s ease;
}

.honeycomb-circle:hover {
    transform: scale(1.2) rotate(10deg);
    box-shadow: 0 6px 20px rgba(255, 183, 0, 0.5);
    background: linear-gradient(135deg, #ffed4e, #ffd700);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(360deg);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

.honeycomb-circle.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* Authentication UI Styles */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-container p {
    font-size: 18px;
    margin: 0;
}

.error {
    color: #ff6b6b;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.user-info-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.user-details {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.user-icon {
    font-size: 20px;
}

.username {
    font-weight: 600;
    color: #333;
}

.logout-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.logout-btn:active {
    transform: translateY(0);
}

/* Login Form Styles */
.login-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
}

.login-form h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 24px;
}

.login-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
}

.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-form button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-form button[type="submit"]:active {
    transform: translateY(0);
}

.login-form .error-message {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
}

/* Adjust main container when user bar is visible */
body.authenticated {
    padding-top: 60px;
}

#main-content {
    margin-top: 60px;
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .honeycomb-circle {
        width: 30px;
        height: 30px;
    }
    
    .frame {
        width: 300px;
        height: 150px;
    }
    
    .circles-container {
        width: 300px;
        height: 150px;
    }
    
    .user-info-bar {
        padding: 8px 15px;
    }
    
    .username {
        font-size: 14px;
    }
    
    .logout-btn {
        padding: 6px 15px;
        font-size: 12px;
    }
}