/* CSS Variables */
:root {
    --primary-color: #006837;
    --primary-hover: #005a2f;
    --secondary-color: #008542;
    --accent-color: #00a651;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    --background-light: #ffffff;
    --background-dark: #f8fafc;
    --text-light: #1f2937;
    --text-dark: #6b7280;
    --border-light: #e5e7eb;
    --border-dark: #d1d5db;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --header-height: 70px;
    --footer-height: 60px;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --overlay-bg: rgba(0, 0, 0, 0.85);
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --glass-backdrop: blur(15px);
    
    /* Gradient Variables */
    --gradient-primary: linear-gradient(135deg, #006837 0%, #008542 50%, #00a651 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    --gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    --gradient-background: linear-gradient(-45deg, #000000, #1a1a1a, #2d2d2d, #434343);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background: var(--gradient-background);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    min-height: 100vh;
    color: var(--text-light);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 104, 55, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.7; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

/* Container */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
}

/* Header */
header {
    background: rgba(0, 104, 55, 0.95);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.header-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-right: 1rem;
}
div#saved-keys-list {
    display: flex
;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    font-size: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

/* Menu Toggle */
.menu-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
    backdrop-filter: var(--glass-backdrop);
    margin-right: 1rem;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Side Menu */
.side-menu {
    position: fixed;
    right: -100%;
    top: 0;
    width: 320px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    border-left: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    padding: calc(var(--header-height) + 1rem) 1rem 1rem 1rem;
}

.side-menu.active {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-header h3 {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.menu-close {
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.menu-close:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.menu-items {
    list-style: none;
}

.menu-item {
    margin-bottom: 1rem;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition);
    z-index: -1;
    opacity: 0.1;
}

.menu-link:hover::before {
    left: 0;
}

.menu-link:hover {
    color: white;
    transform: translateX(5px);
}

.menu-link i {
    margin-left: 0.75rem;
    width: 20px;
    text-align: center;
}

.submenu {
    list-style: none;
    margin-right: 2rem;
    margin-top: 0.5rem;
    display: none;
    transition: var(--transition);
}

.submenu.active {
    display: block;
}

.submenu .menu-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin: 2rem 0;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.feature-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    backdrop-filter: var(--glass-backdrop);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge:hover {
    background: rgba(0, 104, 55, 0.3);
    border-color: rgba(0, 104, 55, 0.8);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Login Form */
.login-container {
    width: 100%;
    max-width: 500px;
    margin: 2rem 0;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--transition);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.form-title {
    text-align: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: white;
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 104, 55, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.input-group i {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.input-group input:focus + i {
    color: var(--primary-color);
}

/* Buttons */
.verify-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem;
    width: 100%;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.verify-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.verify-button:hover::before {
    left: 100%;
}

.verify-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.verify-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.purchase-button {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 1rem;
    width: 100%;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    gap: 0.5rem;
}

.purchase-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: transform 0.6s, opacity 0.6s;
}

.purchase-button:hover::after {
    opacity: 1;
    transform: scale(1);
}

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

.login-button {
    background: var(--gradient-success);
    color: white;
    border: none;
    padding: 1rem;
    width: 100%;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    gap: 0.5rem;
}

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

.logout-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem;
    width: 100%;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Success Message */
.success-message {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.success-message i {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Saved Keys */
.saved-keys {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.saved-keys h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.saved-key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.saved-key-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.masked-key {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
}

.key-actions {
    display: flex;
    gap: 0.5rem;
}

.key-action-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-action-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Product Info */
.product-info {
    width: 100%;
    max-width: 1000px;
    margin: 2rem 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 255, 255, 0.3);
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.target-audience {
    background: rgba(0, 104, 55, 0.1);
    border: 1px solid rgba(0, 104, 55, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

.target-audience h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.audience-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
    color: white;
}

.audience-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.audience-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.error {
    background: var(--gradient-error);
}

.toast.success {
    background: var(--gradient-success);
}

.toast.show {
    transform: translateX(0);
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

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

/* Footer */
footer {
    background: rgba(0, 104, 55, 0.95);
    color: white;
    padding: 1.5rem;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 10;
    margin-top: auto;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .header-title {
        font-size: 1.2rem;
    }

    .container {
        padding: 0.75rem;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .glass {
        padding: 2rem 1.5rem;
    }

    .feature-badges {
        gap: 0.5rem;
    }

    .badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .audience-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .side-menu {
        width: 280px;
    }

    .input-group input {
        padding: 0.875rem 2.5rem 0.875rem 0.875rem;
    }

    .verify-button,
    .purchase-button,
    .login-button,
    .logout-button {
        padding: 0.875rem;
        font-size: 1rem;
    }
}

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

    .glass {
        padding: 1.5rem 1rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .feature-badges {
        flex-direction: column;
        align-items: center;
    }

    .badge {
        width: fit-content;
    }

    .info-card,
    .audience-item {
        padding: 1.5rem;
    }

    .target-audience {
        padding: 1.5rem;
    }

    .audience-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    header,
    .side-menu,
    .particles,
    .toast {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --text-light: #000;
        --text-dark: #666;
        --background-light: #fff;
        --border-light: #000;
    }
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Login Section States */
.login-section {
    display: block;
}

.login-section.hidden {
    display: none;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

.slide-up {
    animation: slideUp 0.5s ease-in-out;
}

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