/* Login Page Specific Styles */

/* Login Section */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, var(--dark-purple), var(--bg-primary));
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Login Card */
.login-card,
.welcome-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 20px;
    padding: 2rem 3rem;
    width: 100%;
    max-width: 650px; /* Increased from 550px to 650px for wider container */
    box-shadow: var(--shadow-card);
    position: relative;
    transition: all 0.3s ease;
}

.login-card:hover,
.welcome-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(107, 70, 193, 0.3);
}

/* Login Header */
.login-header,
.welcome-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo {
    margin-bottom: 1rem;
}

.login-logo .logo-circle {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto;
    padding: 6px;
}

.login-logo .hero-logo-img {
    width: 100%;
    height: 100%;
    max-width: 60px;
    max-height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.login-title,
.welcome-title {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-subtitle,
.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    font-family: var(--font-secondary);
}

/* Form Styles */
.login-form {
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    font-family: var(--font-secondary);
}

.form-group label i {
    color: var(--primary-purple);
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(107, 70, 193, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-secondary);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.3);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Password Input */
.password-input {
    position: relative;
}

.password-input input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-purple);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-secondary);
}

/* Custom Checkbox Styling */
.remember-me input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(107, 70, 193, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.remember-me:hover .checkmark {
    border-color: var(--primary-purple);
    background-color: rgba(107, 70, 193, 0.1);
}

.remember-me input:checked ~ .checkmark {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me input:checked ~ .checkmark:after {
    display: block;
}

.forgot-password {
    color: #ef4444;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: var(--font-secondary);
    transition: color 0.3s ease;
    font-weight: 500;
}

.forgot-password:hover {
    color: #dc2626;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 70, 193, 0.4);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    color: var(--text-secondary);
    font-family: var(--font-secondary);
}

.user-info {
    background: rgba(107, 70, 193, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
}

.user-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-primary);
}

.user-info p {
    color: var(--text-secondary);
    font-family: var(--font-secondary);
}

.logout-btn {
    background: linear-gradient(135deg, #DC2626, #EF4444);
    color: white;
    border: 2px solid #DC2626;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    position: relative;
    overflow: hidden;
}

.logout-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.6s ease;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #B91C1C, #DC2626);
    border-color: #B91C1C;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5);
}

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

.logout-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 20px;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    box-shadow: var(--shadow-card);
    position: relative;
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 2rem 3rem 1rem;
    border-bottom: 1px solid rgba(107, 70, 193, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    font-family: var(--font-primary);
    color: var(--text-primary);
    margin: 0;
    font-size: 1.8rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-purple);
    background: rgba(107, 70, 193, 0.1);
}

.modal-body {
    padding: 2rem 3rem 3rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

/* Custom scrollbar for modal body */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-cyan);
}

/* Firefox scrollbar */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-purple) rgba(255, 255, 255, 0.1);
}

/* Role Information Styles - Side by Side Layout */
.role-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.role-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-radius: 15px;
    padding: 1.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.role-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-purple);
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.3);
}

.role-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.role-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
    position: relative;
}

.role-icon.admin {
    background: linear-gradient(135deg, #F59E0B, #F97316);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.role-icon.player {
    background: linear-gradient(135deg, #6B46C1, #8B5CF6);
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.3);
}

.role-icon.viewer {
    background: linear-gradient(135deg, #06B6D4, #0EA5E9);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

.role-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.role-details h3 {
    font-family: var(--font-primary);
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.role-details p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.role-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.role-details li {
    color: var(--text-secondary);
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(107, 70, 193, 0.1);
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.3;
    font-size: 0.9rem;
}

.role-details li:last-child {
    border-bottom: none;
}

.role-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-purple);
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-card,
    .welcome-card {
        padding: 1.5rem 2rem;
        margin: 1rem;
        max-width: 95%;
    }

    .login-title,
    .welcome-title {
        font-size: 1.8rem;
    }

    .form-options {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.8rem;
        margin-bottom: 1.2rem;
    }

    .login-logo .logo-circle {
        width: 50px;
        height: 50px;
    }

    .login-logo .hero-logo-img {
        max-width: 50px;
        max-height: 50px;
    }
}

/* Responsive Modal */
@media (max-width: 1024px) {
    .role-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .role-item {
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: calc(90vh - 120px);
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-body {
        max-height: calc(90vh - 200px);
    }
    
    .role-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .role-item {
        padding: 1.5rem;
        min-height: auto;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        position: fixed;
        top: 0;
        left: 0;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .modal-body {
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
    }
    
    .role-item {
        padding: 1.2rem;
        min-height: auto;
        height: auto;
    }
}

/* User Avatar */
.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-purple);
    margin: 0 auto 1rem;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* User Info */
.user-info {
    text-align: center;
    margin: 2rem 0;
}

.user-details h3 {
    color: var(--text-primary);
    margin: 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.user-details p {
    color: var(--text-secondary);
    margin: 0.3rem 0;
    font-size: 0.95rem;
}

/* Welcome Actions */
.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.5);
    color: white;
    text-decoration: none;
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(107, 70, 193, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(107, 70, 193, 0.2);
    border-color: var(--primary-purple);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Logout Section */
.logout-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Welcome Card Responsive */
@media (max-width: 768px) {
    .welcome-actions {
        gap: 0.8rem;
    }
    
    .action-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .user-details h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .welcome-actions {
        gap: 0.6rem;
    }
    
    .action-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
    }
    
    .user-details h3 {
        font-size: 1.2rem;
    }
}

/* Password Reset Modal Styles - Add to login.css */

/* Reset Modal Specific Styles */
.reset-modal {
    max-width: 500px;
    animation: modalSlideIn 0.3s ease;
}

.modal.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Reset Form */
.reset-form {
    display: block;
}

.reset-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(107, 70, 193, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(107, 70, 193, 0.2);
}

.reset-info .info-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.3);
}

.reset-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Error Message in Reset Modal - FIXED STYLING */
#resetErrorMessage {
    display: none;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    margin-top: 1rem;
    margin-bottom: 0;
}

#resetErrorMessage i {
    color: #EF4444;
    font-size: 1.2rem;
    flex-shrink: 0;
}

#resetErrorMessage .error-text {
    color: #FCA5A5;
    font-size: 0.9rem;
    line-height: 1.4;
    flex: 1;
}

/* Reset Actions */
.reset-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.reset-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.reset-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
}

.reset-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.5);
}

.reset-btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.reset-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(107, 70, 193, 0.3);
}

.reset-btn.secondary:hover {
    background: rgba(107, 70, 193, 0.1);
    border-color: var(--primary-purple);
}

.reset-btn .btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
}

/* Success Message */
.reset-success {
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.5s ease;
}

.reset-success .success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10B981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.reset-success h3 {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.reset-success p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: 1rem;
}

.reset-success .email-display {
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 1rem 0 1.5rem;
    padding: 0.8rem;
    background: rgba(107, 70, 193, 0.1);
    border-radius: 8px;
    word-break: break-all;
}

.reset-success .success-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.reset-success .success-info i {
    color: #3B82F6;
    font-size: 1.2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.reset-success .success-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    text-align: left;
}

.reset-success .reset-btn {
    margin-top: 1.5rem;
    width: 100%;
}

/* Error Message Animation */
#resetErrorMessage.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* ===========================
   RESPONSIVE DESIGN - ENHANCED
   =========================== */

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    .login-section {
        padding: 100px 20px 60px;
    }

    .login-card,
    .welcome-card {
        max-width: 550px; /* Increased from 450px to 550px for wider container on tablets */
    }

    .role-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .role-item {
        min-height: 320px;
    }

    .modal-content {
        max-width: 800px;
    }
}

/* Tablet Portrait & Mobile Landscape (768px and below) - IMPROVED LAYOUT */
@media (max-width: 768px) {
    /* Login Section */
    .login-section {
        padding: 80px 20px 40px; /* Reduced padding */
        min-height: 100vh;
    }

    /* Login/Welcome Cards */
    .login-card,
    .welcome-card {
        max-width: 100%;
        padding: 2rem 1.8rem; /* Slightly reduced padding */
        margin: 0 15px;
    }

    .login-card:hover,
    .welcome-card:hover {
        transform: none;
    }

    /* Login Header */
    .login-logo .logo-circle {
        width: 65px; /* Slightly smaller logo */
        height: 65px;
        font-size: 1.6rem;
    }

    .login-logo .hero-logo-img {
        max-width: 65px;
        max-height: 65px;
    }

    .login-title,
    .welcome-title {
        font-size: clamp(1.8rem, 6vw, 2.2rem); /* Responsive sizing */
        letter-spacing: 0.4px;
    }

    .login-subtitle,
    .welcome-subtitle {
        font-size: clamp(0.9rem, 3.5vw, 1rem);
    }

    /* Form Elements - Improved Spacing */
    .form-group {
        margin-bottom: 1.1rem; /* Reduced from 1.3rem */
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .form-group input {
        padding: 0.8rem; /* Slightly reduced */
        font-size: 0.9rem;
        min-height: 46px; /* Slightly smaller */
    }

    .password-input input {
        padding-right: 2.8rem;
    }

    .toggle-password {
        right: 0.8rem;
        padding: 0.5rem;
        min-width: 38px;
        min-height: 38px;
    }

    /* Form Options - Better Mobile Layout */
    .form-options {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap; /* Keep on same line */
        gap: 0.8rem;
        margin-bottom: 1.2rem; /* Reduced margin */
    }

    .remember-me {
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .forgot-password {
        font-size: 0.8rem;
        padding: 0.4rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Login Button */
    .login-btn {
        padding: 0.85rem 1rem; /* Slightly reduced */
        font-size: 0.95rem;
        min-height: 48px;
    }

    .login-btn:hover {
        transform: none;
    }

    .login-btn:active {
        transform: scale(0.98);
    }

    /* Error Message */
    .error-message {
        padding: 0.8rem 0.9rem;
        font-size: 0.8rem;
        margin-top: 0.9rem;
    }

    /* Welcome Card Elements */
    .user-avatar {
        width: 70px;
        height: 70px;
        border-width: 2px;
    }

    .user-details h3 {
        font-size: 1.4rem;
    }

    .user-details p {
        font-size: 0.9rem;
    }

    .user-info {
        margin: 1.5rem 0;
        padding: 1.2rem;
    }

    .welcome-actions {
        gap: 0.9rem;
        margin: 1.5rem 0;
    }

    .action-btn {
        padding: 0.9rem 1.3rem;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .action-btn.primary:hover,
    .action-btn.secondary:hover {
        transform: none;
    }

    .action-btn:active {
        transform: scale(0.98);
    }

    .logout-section {
        margin-top: 1.5rem;
        padding-top: 1.2rem;
    }

    .logout-btn {
        padding: 0.85rem 1.3rem;
        font-size: 0.95rem;
        min-height: 48px;
        width: 100%;
    }

    .logout-btn:hover {
        transform: none;
    }

    .logout-btn:active {
        transform: scale(0.98);
    }

    /* Modal Styles */
    .modal {
        backdrop-filter: blur(8px);
    }

    .modal-content {
        width: 95%;
        max-width: 90%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .close-modal {
        font-size: 1.3rem;
        padding: 0.4rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    /* Role Info - Stack Vertically */
    .role-info {
        grid-template-columns: 1fr;
        gap: 1.3rem;
    }
    
    .role-item {
        padding: 1.5rem;
        min-height: auto;
    }

    .role-icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        margin-bottom: 1.2rem;
    }

    .role-details h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .role-details p {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .role-details li {
        font-size: 0.85rem;
        padding: 0.35rem 0;
        padding-left: 1.3rem;
    }

    /* Password Reset Modal */
    .reset-modal {
        max-width: 90%;
        margin: 10% auto;
    }

    .reset-info {
        padding: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .reset-info .info-icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }

    .reset-info p {
        font-size: 0.9rem;
    }

    .reset-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .reset-btn {
        width: 100%;
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .reset-btn.primary:hover {
        transform: none;
    }

    .reset-btn:active {
        transform: scale(0.98);
    }

    .reset-success {
        padding: 1.5rem 1rem;
    }

    .reset-success .success-icon {
        width: 70px;
        height: 70px;
        font-size: 2.2rem;
        margin-bottom: 1.2rem;
    }

    .reset-success h3 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .reset-success p {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }

    .reset-success .email-display {
        font-size: 1rem;
        padding: 0.7rem;
        margin: 0.8rem 0 1.2rem;
    }

    .reset-success .success-info {
        padding: 0.9rem;
        margin: 1.2rem 0;
    }

    .reset-success .success-info i {
        font-size: 1.1rem;
    }

    .reset-success .success-info p {
        font-size: 0.85rem;
    }

    #resetErrorMessage {
        padding: 0.9rem 1rem;
        margin-top: 0.8rem;
    }

    #resetErrorMessage i {
        font-size: 1.1rem;
    }

    #resetErrorMessage .error-text {
        font-size: 0.85rem;
    }
}

/* Mobile Portrait (480px and below) - COMPACT LOGIN FORM */
@media (max-width: 480px) {
    /* Login Section */
    .login-section {
        padding: 70px 15px 30px; /* Reduced top padding */
        min-height: 100vh;
    }

    /* Login/Welcome Cards - More Compact */
    .login-card,
    .welcome-card {
        padding: 1.5rem 1.2rem; /* Reduced padding significantly */
        margin: 0 10px;
        border-radius: 15px; /* Slightly smaller border radius */
    }

    /* Login Header - Compact */
    .login-header,
    .welcome-header {
        margin-bottom: 1.2rem; /* Reduced margin */
    }

    .login-logo {
        margin-bottom: 0.8rem; /* Reduced margin */
    }

    .login-logo .logo-circle {
        width: 55px; /* Smaller logo */
        height: 55px;
        font-size: 1.4rem;
    }

    .login-logo .hero-logo-img {
        max-width: 55px;
        max-height: 55px;
    }

    .login-title,
    .welcome-title {
        font-size: 1.6rem; /* Slightly smaller title */
        letter-spacing: 0.2px;
        margin-bottom: 0.3rem; /* Reduced margin */
    }

    .login-subtitle,
    .welcome-subtitle {
        font-size: 0.9rem;
    }

    /* Form Elements - More Compact */
    .login-form {
        margin-bottom: 1.2rem; /* Reduced margin */
    }

    .form-group {
        margin-bottom: 0.9rem; /* Significantly reduced spacing between form groups */
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 0.4rem; /* Reduced label margin */
    }

    .form-group input {
        padding: 0.7rem; /* Reduced input padding */
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .password-input input {
        padding-right: 2.5rem;
    }

    .toggle-password {
        right: 0.7rem;
        padding: 0.4rem;
        min-width: 36px;
        min-height: 36px;
    }

    .toggle-password i {
        font-size: 0.9rem;
    }

    /* Form Options - Same Line Layout for Mobile */
    .form-options {
        display: flex; /* Change back to flex for same line */
        justify-content: space-between; /* Space between elements */
        align-items: center; /* Center align vertically */
        flex-wrap: nowrap; /* Don't wrap to keep on same line */
        gap: 0.5rem; /* Small gap */
        margin-bottom: 1rem; /* Reduced margin */
    }

    .remember-me {
        font-size: 0.75rem; /* Smaller text */
        white-space: nowrap; /* Prevent text wrapping */
        flex-shrink: 0; /* Don't shrink */
    }

    .forgot-password {
        font-size: 0.75rem; /* Smaller text */
        padding: 0.3rem; /* Reduced padding */
        white-space: nowrap; /* Prevent text wrapping */
        flex-shrink: 0; /* Don't shrink */
    }

    /* Checkbox styling for mobile */
    .checkmark {
        height: 16px; /* Smaller checkbox for mobile */
        width: 16px;
        border-width: 1.5px;
    }
    
    .checkmark:after {
        left: 4px;
        top: 1px;
        width: 3px;
        height: 7px;
        border-width: 0 1.5px 1.5px 0;
    }

    .remember-me input[type="checkbox"] {
        width: 14px; /* Smaller checkbox */
        height: 14px;
        margin-right: 0.3rem;
    }

    /* Login Button - Compact */
    .login-btn {
        padding: 0.8rem; /* Reduced padding */
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .login-btn .btn-icon {
        font-size: 0.85rem;
    }

    /* Error Message - Compact */
    .error-message {
        padding: 0.7rem 0.8rem; /* Reduced padding */
        font-size: 0.75rem; /* Smaller text */
        border-radius: 6px;
        gap: 0.5rem;
        margin-top: 0.8rem; /* Reduced margin */
    }

    .error-message i {
        font-size: 0.9rem;
    }

    /* Welcome Card Elements - Compact */
    .user-avatar {
        width: 60px;
        height: 60px;
    }

    .user-info {
        margin: 1rem 0; /* Reduced margin */
        padding: 0.8rem; /* Reduced padding */
        border-radius: 8px;
    }

    .user-details h3 {
        font-size: 1.2rem;
        margin: 0.3rem 0; /* Reduced margin */
    }

    .user-details p {
        font-size: 0.8rem;
        margin: 0.2rem 0; /* Reduced margin */
    }

    .welcome-actions {
        gap: 0.6rem; /* Reduced gap */
        margin: 1rem 0; /* Reduced margin */
    }

    .action-btn {
        padding: 0.75rem 1rem; /* Reduced padding */
        font-size: 0.85rem;
        border-radius: 8px;
        gap: 0.5rem;
    }

    .action-btn i {
        font-size: 0.9rem;
    }

    .logout-section {
        margin-top: 1rem; /* Reduced margin */
        padding-top: 0.8rem; /* Reduced padding */
    }

    .logout-btn {
        padding: 0.7rem 1rem; /* Reduced padding */
        font-size: 0.85rem;
        border-radius: 8px;
        gap: 0.4rem;
    }

    .logout-btn i {
        font-size: 0.9rem;
    }

    /* Modal - Full Screen */
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .modal-header {
        padding: 1.2rem 1.2rem 0.9rem;
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        z-index: 10;
        border-bottom: 1px solid rgba(107, 70, 193, 0.2);
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .close-modal {
        font-size: 1.2rem;
        padding: 0.3rem;
    }

    .modal-body {
        padding: 1.2rem;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Role Info */
    .role-info {
        gap: 1rem;
    }

    .role-item {
        padding: 1.2rem;
        border-radius: 12px;
    }

    .role-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .role-details h3 {
        font-size: 1rem;
        margin-bottom: 0.7rem;
    }

    .role-details p {
        font-size: 0.85rem;
        margin-bottom: 0.7rem;
    }

    .role-details li {
        font-size: 0.8rem;
        padding: 0.3rem 0;
        padding-left: 1.2rem;
        line-height: 1.4;
    }

    .role-details li::before {
        font-size: 0.85rem;
    }

    /* Password Reset Modal */
    .reset-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .reset-info {
        padding: 1.1rem;
        margin-bottom: 1.2rem;
        border-radius: 10px;
    }

    .reset-info .info-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        margin-bottom: 0.7rem;
    }

    .reset-info p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .reset-actions {
        gap: 0.7rem;
        margin-top: 1.2rem;
    }

    .reset-btn {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .reset-btn i {
        font-size: 0.9rem;
    }

    .reset-success {
        padding: 1.2rem 0.8rem;
    }

    .reset-success .success-icon {
        width: 65px;
        height: 65px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .reset-success h3 {
        font-size: 1.4rem;
        margin-bottom: 0.7rem;
    }

    .reset-success p {
        font-size: 0.9rem;
        margin-bottom: 0.35rem;
    }

    .reset-success .email-display {
        font-size: 0.95rem;
        padding: 0.65rem;
        margin: 0.7rem 0 1rem;
        border-radius: 6px;
    }

    .reset-success .success-info {
        padding: 0.8rem;
        margin: 1rem 0;
        gap: 0.6rem;
        border-radius: 8px;
    }

    .reset-success .success-info i {
        font-size: 1rem;
    }

    .reset-success .success-info p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .reset-success .reset-btn {
        margin-top: 1.2rem;
    }

    #resetErrorMessage {
        padding: 0.8rem 0.9rem;
        margin-top: 0.7rem;
        border-radius: 8px;
        gap: 0.6rem;
    }

    #resetErrorMessage i {
        font-size: 1rem;
    }

    #resetErrorMessage .error-text {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
    .login-section {
        padding: 75px 10px 35px;
    }

    .login-card,
    .welcome-card {
        padding: 1.8rem 1.3rem;
        margin: 0 5px;
    }

    .login-logo .logo-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .login-logo .hero-logo-img {
        max-width: 60px;
        max-height: 60px;
    }

    .login-title,
    .welcome-title {
        font-size: 1.6rem;
    }

    .login-subtitle,
    .welcome-subtitle {
        font-size: 0.9rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input {
        padding: 0.8rem;
        font-size: 0.85rem;
    }

    .login-btn {
        padding: 0.85rem;
        font-size: 0.9rem;
    }

    .user-avatar {
        width: 60px;
        height: 60px;
    }

    .user-details h3 {
        font-size: 1.2rem;
    }

    .user-details p {
        font-size: 0.8rem;
    }

    .action-btn {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }

    .logout-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .role-item {
        padding: 1rem;
    }

    .role-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .role-details h3 {
        font-size: 0.95rem;
    }

    .role-details p,
    .role-details li {
        font-size: 0.75rem;
    }
}

/* Landscape Orientation - Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .login-section {
        padding: 70px 20px 30px;
        min-height: auto;
    }

    .login-card,
    .welcome-card {
        max-width: 500px;
        padding: 1.5rem;
    }

    .login-logo {
        margin-bottom: 0.8rem;
    }

    .login-logo .logo-circle {
        width: 55px;
        height: 55px;
    }

    .login-header,
    .welcome-header {
        margin-bottom: 1rem;
    }

    .login-title,
    .welcome-title {
        font-size: 1.5rem;
    }

    .login-subtitle,
    .welcome-subtitle {
        font-size: 0.9rem;
    }

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

    .form-options {
        margin-bottom: 1rem;
    }

    .user-info {
        margin: 1rem 0;
        padding: 0.8rem;
    }

    .user-avatar {
        width: 55px;
        height: 55px;
    }

    .welcome-actions {
        margin: 1rem 0;
        gap: 0.6rem;
    }

    .action-btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }

    .logout-section {
        margin-top: 1rem;
        padding-top: 0.8rem;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-body {
        max-height: calc(90vh - 70px);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .login-card:hover,
    .welcome-card:hover,
    .login-btn:hover,
    .action-btn.primary:hover,
    .action-btn.secondary:hover,
    .logout-btn:hover,
    .reset-btn.primary:hover,
    .role-item:hover {
        transform: none;
    }

    .toggle-password:hover {
        color: var(--text-secondary);
    }

    .close-modal:hover {
        color: var(--text-secondary);
        background: transparent;
    }

    .forgot-password:hover {
        color: #ef4444;
    }

    /* Add touch-friendly active states */
    .login-btn:active {
        transform: scale(0.98);
    }

    .action-btn:active {
        transform: scale(0.98);
    }

    .logout-btn:active {
        transform: scale(0.98);
    }

    .reset-btn:active {
        transform: scale(0.98);
    }

    .toggle-password:active {
        color: var(--primary-purple);
        transform: scale(0.95);
    }

    .close-modal:active {
        color: var(--primary-purple);
        background: rgba(107, 70, 193, 0.1);
    }

    .forgot-password:active {
        color: #dc2626;
    }

    /* Ensure minimum tap targets */
    .toggle-password,
    .close-modal {
        min-width: 44px;
        min-height: 44px;
    }

    .login-btn,
    .action-btn,
    .logout-btn,
    .reset-btn {
        min-height: 48px;
    }

    .form-group input {
        min-height: 48px;
    }

    .remember-me {
        min-height: 44px;
        padding: 0.5rem;
    }

    .forgot-password {
        min-height: 44px;
    }
}

/* High DPI Displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-logo .hero-logo-img,
    .user-avatar img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Smooth scrolling for modals */
@media (max-width: 768px) {
    .modal-body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Prevent text selection on buttons */
    .login-btn,
    .action-btn,
    .logout-btn,
    .reset-btn,
    .toggle-password,
    .close-modal {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }

    /* Better input focus for mobile */
    .form-group input:focus {
        transform: scale(1.01);
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    /* Focus indicators for keyboard navigation */
    .login-btn:focus,
    .action-btn:focus,
    .logout-btn:focus,
    .reset-btn:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }

    .form-group input:focus {
        outline: 2px solid var(--primary-purple);
        outline-offset: 1px;
    }

    .toggle-password:focus,
    .close-modal:focus {
        outline: 2px solid var(--primary-purple);
        outline-offset: 2px;
    }

    /* Better text sizing for readability */
    .user-details p,
    .role-details p,
    .reset-info p {
        line-height: 1.6;
    }

    /* Ensure labels are readable */
    .form-group label {
        line-height: 1.4;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .login-background,
    .toggle-password,
    .forgot-password,
    .logout-btn,
    .modal {
        display: none !important;
    }

    .login-section {
        padding: 2rem 0;
        background: white !important;
    }

    .login-card,
    .welcome-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .login-title,
    .welcome-title {
        color: black !important;
        text-shadow: none !important;
    }
}

/* Privacy Policy & Terms of Service Modal Styles */
.policy-content,
.terms-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-purple) rgba(255, 255, 255, 0.1);
}

.policy-content::-webkit-scrollbar,
.terms-content::-webkit-scrollbar {
    width: 8px;
}

.policy-content::-webkit-scrollbar-track,
.terms-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.policy-content::-webkit-scrollbar-thumb,
.terms-content::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 4px;
}

.policy-content::-webkit-scrollbar-thumb:hover,
.terms-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-purple);
}

.policy-section,
.terms-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.policy-section:hover,
.terms-section:hover {
    border-color: var(--primary-purple);
    background: rgba(107, 70, 193, 0.1);
}

.policy-section h3,
.terms-section h3 {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.policy-section h3 i,
.terms-section h3 i {
    color: var(--primary-purple);
    font-size: 1.1rem;
}

.policy-section p,
.terms-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.policy-section ul,
.terms-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-section li,
.terms-section li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(107, 70, 193, 0.1);
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.4;
    font-size: 0.95rem;
}

.policy-section li:last-child,
.terms-section li:last-child {
    border-bottom: none;
}

.policy-section li::before,
.terms-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-purple);
    font-weight: bold;
    font-size: 1.2rem;
}

.policy-footer,
.terms-footer {
    background: rgba(107, 70, 193, 0.1);
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-radius: 10px;
    padding: 1.2rem;
    margin-top: 1.5rem;
    text-align: center;
}

.policy-footer p,
.terms-footer p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.policy-footer a,
.terms-footer a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
}

.policy-footer a:hover,
.terms-footer a:hover {
    text-decoration: underline;
}

/* Contact Support Modal Styles */
.contact-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-purple) rgba(255, 255, 255, 0.1);
}

/* Role Information Modal Styles - Following same pattern */
.role-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-purple) rgba(255, 255, 255, 0.1);
}

.contact-content::-webkit-scrollbar {
    width: 8px;
}

.contact-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.contact-content::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 4px;
}

.contact-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-purple);
}

.role-content::-webkit-scrollbar {
    width: 8px;
}

.role-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.role-content::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 4px;
}

.role-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-purple);
}

.contact-intro {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(107, 70, 193, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(107, 70, 193, 0.2);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.3);
}

.contact-intro h3 {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.contact-intro p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

.contact-methods {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-method {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.3s ease;
}

.contact-method:hover {
    border-color: var(--primary-purple);
    background: rgba(107, 70, 193, 0.1);
    transform: translateY(-2px);
}

.method-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.method-icon.email {
    background: linear-gradient(135deg, #F59E0B, #F97316);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.method-icon.discord {
    background: linear-gradient(135deg, #5865F2, #7289DA);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.3);
}

.method-icon.facebook {
    background: linear-gradient(135deg, #1877F2, #42A5F5);
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.3);
}

.method-details {
    flex: 1;
}

.method-details h4 {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.method-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.5);
    color: white;
    text-decoration: none;
}

/* Email Form Styles */
.email-form {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-form h4 {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.email-form .form-group {
    margin-bottom: 1rem;
}

.email-form label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.email-form input,
.email-form select,
.email-form textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    resize: vertical;
}

.email-form input:focus,
.email-form select:focus,
.email-form textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.3);
}

.email-form input::placeholder,
.email-form textarea::placeholder {
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.submit-btn {
    flex: 1;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.5);
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(107, 70, 193, 0.3);
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cancel-btn:hover {
    background: rgba(107, 70, 193, 0.1);
    border-color: var(--primary-purple);
}

.contact-footer {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1.2rem;
    margin-top: 1.5rem;
}

.response-time,
.contact-email {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.response-time i,
.contact-email i {
    color: #3B82F6;
    font-size: 1rem;
}

.contact-email a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
}

.contact-email a:hover {
    text-decoration: underline;
}

/* Responsive Design for New Modals */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        margin: 5% auto;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
        flex-shrink: 0;
    }

    .modal-body {
        padding: 0 1.5rem 1.5rem;
        flex: 1;
        overflow: hidden;
    }

    .policy-content,
    .terms-content,
    .contact-content,
    .role-content {
        max-height: calc(90vh - 120px);
        overflow-y: auto;
        padding-right: 0.5rem;
        margin: 0;
    }
    
    .policy-section,
    .terms-section {
        padding: 1.2rem;
        margin-bottom: 1.2rem;
    }
    
    .policy-section h3,
    .terms-section h3 {
        font-size: 1.1rem;
        gap: 0.6rem;
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem;
    }
    
    .method-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .contact-intro {
        padding: 1.2rem;
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .response-time,
    .contact-email {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .email-form {
        margin: 1rem 0;
        padding: 1.2rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .modal-header {
        padding: 1.2rem 1.2rem 0.9rem;
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        z-index: 10;
        border-bottom: 1px solid rgba(107, 70, 193, 0.2);
        flex-shrink: 0;
    }

    .modal-body {
        padding: 1.2rem;
        flex: 1;
        overflow: hidden;
    }

    .policy-content,
    .terms-content,
    .contact-content,
    .role-content {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding-right: 0.3rem;
    }

    .policy-section,
    .terms-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .policy-section h3,
    .terms-section h3 {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .policy-section li,
    .terms-section li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
        padding-left: 1.2rem;
    }
    
    .contact-method {
        padding: 1rem;
    }
    
    .method-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .method-details h4 {
        font-size: 1rem;
    }
    
    .method-details p {
        font-size: 0.85rem;
    }
    
    .contact-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .email-form {
        padding: 1.2rem;
        margin: 1rem 0;
    }
    
    .email-form h4 {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .email-form input,
    .email-form select,
    .email-form textarea {
        padding: 0.7rem;
        font-size: 0.85rem;
    }
    
    .submit-btn,
    .cancel-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    /* Ensure proper scrolling on very small screens */
    .policy-footer,
    .terms-footer,
    .contact-footer {
        margin-top: 1rem;
        padding: 1rem;
    }
}

/* Ensure smooth scrolling behavior */
.policy-content,
.terms-content,
.contact-content {
    scroll-behavior: smooth;
}

/* Fix for iOS safari scrolling */
@supports (-webkit-overflow-scrolling: touch) {
    .policy-content,
    .terms-content,
    .contact-content {
        -webkit-overflow-scrolling: touch;
        transform: translateZ(0);
    }
}

/* Additional modal positioning fixes */
@media (max-height: 600px) {
    .modal-content {
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .policy-content,
    .terms-content,
    .contact-content {
        max-height: calc(95vh - 100px);
    }
}

/* Landscape orientation fixes for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        margin: 1% auto;
        max-height: 98vh;
    }
    
    .modal-header {
        padding: 1rem 2rem 0.5rem;
    }
    
    .modal-body {
        padding: 0.5rem 2rem 1rem;
    }
    
    .policy-content,
    .terms-content,
    .contact-content {
        max-height: calc(98vh - 80px);
    }
}

/* Support Subject Dropdown */
select#supportSubject {
    color: var(--text-muted); /* Match placeholder color */
}

select#supportSubject:focus {
    color: black; /* Ensure options are visible */
    background-color: rgb(236, 236, 236); /* White background for dropdown */
}