* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #DAA520 0%, #228B22 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border: 3px solid #333;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Quest Header Styles */
.quest-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    gap: 20px;
}

.tree-icon {
    width: 60px;
    height: auto;
    image-rendering: pixelated;
}

.welcome-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pixel-text {
    font-family: 'DotGothic16', monospace;
    font-size: 18px;
    color: #333;
    line-height: 1.2;
    letter-spacing: 1px;
}

/* Auth Toggle */
.auth-toggle {
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}

.create-link {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

.create-link:hover {
    color: #0056b3;
}

.separator {
    margin: 0 8px;
    color: #999;
}

.login-text {
    color: #666;
}

/* Form Styles */
.name-fields {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.name-fields.hidden {
    display: none;
}

.name-fields .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

input[type="email"], input[type="password"], input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #f8f9fa;
}

input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

/* Password Criteria */
.password-criteria {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.password-criteria.hidden {
    display: none;
}

/* Agreement Section */
.agreement-section {
    margin-bottom: 20px;
    text-align: left;
}

.agreement-section.hidden {
    display: none;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.checkbox-container input[type="checkbox"] {
    margin: 0;
    width: auto;
    flex-shrink: 0;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #DAA520 0%, #228B22 100%);
    color: white;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(218, 165, 32, 0.3);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.error {
    color: #e74c3c;
    margin-top: 10px;
    font-size: 14px;
}

.success {
    color: #27ae60;
    margin-top: 10px;
    font-size: 14px;
}

.loading {
    color: #667eea;
    margin-top: 10px;
    font-size: 14px;
}

/* Home Screen Styles */
.home-screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    background: #f8f9fa;
    padding: 0;
}

.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: white;
    border-bottom: 2px solid #e1e5e9;
    margin-bottom: 30px;
}

.profile-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #333;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.profile-circle:hover {
    background: #e0e0e0;
}

#user-initials {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.user-name {
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

.logout-btn {
    color: #007bff;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-decoration: underline;
}

.logout-btn:hover {
    color: #0056b3;
}

.home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.welcome-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    gap: 30px;
    background: white;
    border: 3px solid #333;
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
}

.pixel-icon {
    width: 80px;
    height: auto;
    image-rendering: pixelated;
}

.left-icon {
    flex-shrink: 0;
}

.right-icon {
    flex-shrink: 0;
}

.welcome-text-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #228B22 0%, #006400 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: flex-start;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(34, 139, 34, 0.3);
}

.btn-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.btn-text {
    flex-grow: 1;
    text-align: left;
}

/* Individual Pages */
.page {
    display: none;
    width: 100%;
    min-height: 100vh;
    background: #f8f9fa;
    padding: 0;
}

.page.hidden {
    display: none;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-bottom: 2px solid #e1e5e9;
    margin-bottom: 30px;
}

.back-btn {
    background: none;
    border: none;
    color: #007bff;
    font-size: 16px;
    cursor: pointer;
    text-decoration: underline;
}

.back-btn:hover {
    color: #0056b3;
}

.page-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.page-content {
    padding: 0 20px;
    color: #666;
}

/* Hide welcome screen initially */
.welcome-screen {
    display: none;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .home-header {
        padding: 15px;
    }
    
    .profile-circle {
        width: 50px;
        height: 50px;
    }
    
    .user-name {
        font-size: 16px;
    }
    
    .welcome-section {
        flex-direction: column;
        gap: 20px;
        padding: 30px 20px;
    }
    
    .pixel-icon {
        width: 60px;
    }
    
    .nav-btn {
        padding: 18px;
        font-size: 16px;
    }
    
    .btn-icon {
        font-size: 20px;
    }
}

.config-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: left;
}

/* Password Gate Styles */
.password-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.gate-container {
    text-align: center;
    padding: 40px;
}

.gate-title {
    font-family: 'DotGothic16', monospace;
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.gate-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.gate-input {
    width: 300px;
    height: 50px;
    border: 2px solid #333;
    background: white;
    font-family: monospace;
    font-size: 16px;
    padding: 0 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

.gate-input:focus {
    border-color: #667eea;
}

.gate-button {
    width: 50px;
    height: 50px;
    border: 2px solid #333;
    background: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gate-button:hover {
    background: #333;
    color: white;
}

.gate-error {
    color: #e74c3c;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 20px;
}

/* Hide main app initially */
.main-app.hidden {
    display: none;
}

.main-app {
    display: block;
}

/* Message styling */
.success {
    color: #27ae60;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

/* Remove admin panel styles completely */
@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .gate-input-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .gate-input {
        width: 250px;
    }
    
    .quest-header {
        gap: 15px;
    }
    
    .tree-icon {
        width: 40px;
    }
    
    .pixel-text {
        font-size: 14px;
    }
    
    .name-fields {
        flex-direction: column;
        gap: 15px;
    }
}