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

:root {
    --primary-color: #2D3748;
    --secondary-color: #4FD1C7;
    --accent-color: #805AD5;
    --text-dark: #1A202C;
    --text-light: #718096;
    --bg-light: #F7FAFC;
    --bg-white: #FFFFFF;
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --border-color: #E2E8F0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    --success-color: #48BB78;
    --error-color: #F56565;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Account button in navigation should look like other nav links */
.nav-links .account-btn {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: inherit !important;
    font-weight: 500 !important;
    color: var(--text-dark) !important;
    text-decoration: none !important;
    transition: color 0.3s !important;
    display: inline !important;
    gap: 0 !important;
    min-height: auto !important;
    min-width: auto !important;
}

.nav-links .account-btn:hover {
    color: var(--accent-color) !important;
    background: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.btn {
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--bg-white);
    color: var(--accent-color);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-purple {
    background: var(--accent-color);
    color: white;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.about-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
}

.about-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.about-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: var(--shadow-sm);
}

/* Product Categories */
.products {
    padding: 80px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    height: 250px;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.product-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Testimonials */
.testimonials {
    padding: 80px 0;
    background: var(--bg-light);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.testimonial-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

.author-info h4 {
    color: var(--text-dark);
    margin-bottom: 0.2rem;
}

.author-info span {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Newsletter */
.newsletter {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: white;
    text-align: center;
}

.newsletter h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.newsletter p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 12px 30px;
    background: var(--bg-white);
    color: var(--accent-color);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    min-width: 120px;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Footer */
footer {
    padding: 40px 0;
    background: var(--text-dark);
    color: white;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #CBD5E0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4A5568;
    color: #CBD5E0;
}

/* Authentication Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.modal-container {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideInUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 600;
}

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

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 2rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}

.auth-tab:hover {
    color: var(--text-dark);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: var(--bg-white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(79, 209, 199, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
}

.password-strength {
    margin-top: 0.5rem;
}

.password-requirements {
    margin-top: 0.5rem;
}

.password-requirements small {
    display: block;
    color: var(--text-light);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    transition: all 0.3s;
    margin-bottom: 0.25rem;
}

.strength-bar.weak {
    background: var(--error-color);
    width: 33%;
}

.strength-bar.medium {
    background: #ECC94B;
    width: 66%;
}

.strength-bar.strong {
    background: var(--success-color);
    width: 100%;
}

.strength-text {
    font-size: 0.8rem;
    color: var(--text-light);
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.auth-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

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

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

.auth-message {
    margin-bottom: 1rem;
    margin-top: 0;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: none;
}

.auth-message.success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.auth-message.error {
    background: rgba(245, 101, 101, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(245, 101, 101, 0.2);
}

/* Value Proposition Styles */
.auth-value-proposition .value-prop-content h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.auth-value-proposition .value-prop-content p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.value-prop-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.value-prop-buttons button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login {
    background: var(--secondary-color);
    color: white;
}

.btn-login:hover {
    background: #38B2AC;
    transform: translateY(-1px);
}

.btn-register {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-register:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        gap: 1rem;
        z-index: 999;
        text-align: center;
    }

    .nav-links.mobile-active {
        display: flex !important;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
    }

    .mobile-menu {
        display: flex;
    }

    .mobile-menu.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .mobile-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn {
        width: 80%;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .about-content {
        gap: 2rem;
    }

    .testimonial-grid {
        gap: 1.5rem;
    }

    .footer-content {
        gap: 2rem;
        text-align: center;
    }

    .container {
        padding: 0 15px;
    }

    .logo-img {
        height: 35px;
    }

    .logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .product-info {
        padding: 1rem;
    }

    .about-item {
        padding: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }
}

/* Form Success/Error States */
.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    max-width: 600px;
    margin: 0 auto 1rem auto;
}

.form-message.success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.form-message.error {
    background: rgba(245, 101, 101, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(128, 90, 213, 0.3);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-loading .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.btn-loading .btn-loading-text {
    opacity: 0;
    visibility: hidden;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add some modern touch improvements */
@media (hover: hover) {
    .nav-links a:hover,
    .product-link:hover,
    .footer-section a:hover {
        transform: translateY(-1px);
    }
}

/* ==============================================
   AUTHENTICATION SYSTEM STYLES
   ============================================== */

/* Account Navigation Button */
.account-nav {
    position: relative;
}

.auth-btn {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    outline: none;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.auth-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Login button specific styling */
.login-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.login-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Account Button (for logged-in users) */
.account-btn {
    background: var(--bg-light);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    outline: none;
}

.account-btn:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.account-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.account-dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

/* Account Dropdown Menu */
.account-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
}

.account-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a,
.dropdown-menu button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background: var(--bg-light);
}

.dropdown-menu hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.logout-btn {
    color: var(--error-color) !important;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(245, 101, 101, 0.1) !important;
}

/* Authentication Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    z-index: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* Modal Header */
.modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.8rem;
    font-weight: 700;
}

.modal-header p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Authentication Forms */
.auth-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(128, 90, 213, 0.1);
}

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

/* Checkbox Group */
.checkbox-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Auth Button Styles in Forms */
.auth-form .auth-btn {
    width: 100%;
    margin: 10px 0;
    padding: 14px;
    font-size: 1rem;
    position: relative;
}

.auth-form .auth-btn.primary {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

.auth-form .auth-btn.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.auth-form .auth-btn.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Authentication Messages */
.auth-message {
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin: 0 0 20px 0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.auth-message.success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
    border-bottom-color: var(--success-color);
}

.auth-message.error {
    background: rgba(245, 101, 101, 0.1);
    color: var(--error-color);
    border-bottom-color: var(--error-color);
}

.auth-message.info {
    background: rgba(128, 90, 213, 0.1);
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

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

/* Button Loading States */
.btn-loading {
    position: relative;
    overflow: hidden;
}

.btn-loading .btn-text {
    opacity: 0;
    visibility: hidden;
}

.btn-loading .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loading-spinner.large {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.loading-spinner.small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 15000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content .loading-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
    margin-bottom: 20px;
}

.loading-content p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Authentication Required Notice (for QR/Cards pages) */
.auth-required-notice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-required-notice.show {
    opacity: 1;
    visibility: visible;
}

.notice-content {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 40px 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.auth-required-notice.show .notice-content {
    transform: scale(1) translateY(0);
}

.notice-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.notice-text h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.notice-text p {
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.6;
}

.notice-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.notice-actions .btn {
    min-width: 120px;
}

/* Pulse Animation for Important Elements */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(128, 90, 213, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(128, 90, 213, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(128, 90, 213, 0);
    }
}

.auth-btn.pulse {
    animation: pulse 2s infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ==============================================
   MOBILE RESPONSIVENESS FOR AUTHENTICATION
   ============================================== */

@media (max-width: 768px) {
    /* Account button in mobile menu */
    .account-nav {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .auth-btn {
        width: 200px;
        margin: 0 auto;
    }

    .login-btn {
        background: var(--primary-color);
        color: white;
        border: none;
    }

    /* Account dropdown adjustments for mobile */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        margin-top: 10px;
        border-radius: 0;
    }

    /* Modal responsiveness */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: 85vh;
    }

    .modal-header {
        padding: 25px 20px 15px;
    }

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

    .auth-form {
        padding: 20px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"] {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: none;
        -webkit-border-radius: 8px;
    }

    /* Touch-friendly checkbox */
    .checkmark {
        width: 22px;
        height: 22px;
    }

    .checkbox-container {
        font-size: 0.85rem;
        min-height: 44px; /* Touch target size */
        align-items: center;
    }

    /* Mobile form layout */
    .checkbox-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* Auth messages mobile */
    .auth-message {
        padding: 15px 20px;
        font-size: 0.85rem;
    }

    /* Authentication notice mobile */
    .notice-content {
        padding: 30px 20px;
        margin: 10px;
    }

    .notice-icon {
        font-size: 2.5rem;
    }

    .notice-text h3 {
        font-size: 1.3rem;
    }

    .notice-actions {
        flex-direction: column;
        gap: 10px;
    }

    .notice-actions .btn {
        width: 100%;
        min-width: auto;
    }

    /* Loading overlay mobile */
    .loading-content {
        padding: 20px;
    }

    .loading-content .loading-spinner {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-height: none;
    }

    .modal-header {
        padding: 20px 15px 15px;
    }

    .auth-form {
        padding: 15px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"] {
        padding: 16px 14px;
    }

    .auth-form .auth-btn {
        padding: 16px;
        font-size: 1.1rem;
    }

    /* Notice content for very small screens */
    .notice-content {
        padding: 25px 15px;
        border-radius: 0;
        width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Keyboard Navigation Support */
.auth-btn:focus,
.account-btn:focus,
.modal-close:focus,
.dropdown-menu a:focus,
.dropdown-menu button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-btn {
        border: 2px solid;
    }

    .modal-content {
        border: 2px solid var(--text-dark);
    }

    .form-group input {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .modal,
    .modal-content,
    .auth-btn,
    .loading-spinner,
    .dropdown-menu,
    .auth-message {
        transition: none;
        animation: none;
    }

    .loading-spinner {
        animation: none;
        border: 2px solid var(--accent-color);
        border-radius: 0;
    }
}

/* Focus visible for better keyboard navigation */
.auth-btn:focus-visible,
.account-btn:focus-visible,
.form-group input:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Touch device optimizations */
@media (pointer: coarse) {
    .auth-btn,
    .account-btn,
    .dropdown-menu a,
    .dropdown-menu button {
        min-height: 44px; /* Minimum touch target */
        min-width: 44px;
    }

    .checkbox-container {
        min-height: 44px;
        padding: 8px 0;
    }

    .modal-close {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}