/* Modern, clean design with responsive layout, dark mode, and accessibility */

/* CSS Variables for theming */
:root {
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --text-primary: #333;
    --text-secondary: #7f8c8d;
    --bg-white: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --card-shadow-hover: rgba(0, 0, 0, 0.15);
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --focus-color: #ffd700;
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --bg-white: #1a1a2e;
    --card-shadow: rgba(0, 0, 0, 0.4);
    --card-shadow-hover: rgba(0, 0, 0, 0.6);
    --accent-primary: #8b9efa;
    --accent-secondary: #9c6bc4;
    --focus-color: #ffd700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    font-weight: 600;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

/* Header */
header {
    background: var(--bg-white);
    padding: 2.5rem 0;
    box-shadow: 0 4px 20px var(--card-shadow);
    position: relative;
    transition: background 0.3s ease;
}

header h1 {
    text-align: center;
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.site-icon {
    font-size: 3rem;
}

.tagline {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 300;
    transition: color 0.3s ease;
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: fixed !important;
    top: 2rem !important;
    right: 2rem !important;
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background 0.3s ease;
    box-shadow: 0 2px 10px var(--card-shadow);
    z-index: 1000;
    margin: 0;
    padding: 0;
}

.dark-mode-toggle:hover {
    background: var(--accent-secondary);
}

.dark-mode-toggle:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
}

.dark-mode-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .dark-mode-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .dark-mode-toggle .moon-icon {
    display: block;
}

/* Main content */
main {
    padding: 4rem 0;
}

section {
    margin-bottom: 3rem;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px var(--card-shadow);
    margin-bottom: 3rem;
    margin-top: 3rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h2 {
    font-size: 3.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
    transition: color 0.3s ease;
}

/* Announcement section */
.announcement {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px var(--card-shadow-hover);
    animation: fadeInUp 0.7s ease-out;
}

.announcement-box {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.announcement-icon {
    font-size: 2rem;
}

.announcement-link {
    color: white;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.announcement-link:hover {
    opacity: 0.9;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.content-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 40px var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.content-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px var(--card-shadow-hover);
}

.content-card.highlight {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.content-card.highlight h3,
.content-card.highlight p {
    color: white;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.content-card:hover .card-icon {
    animation: spin 0.6s ease;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.content-card h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.content-card p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-card a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.content-card a:hover {
    color: var(--accent-secondary);
}

.content-card.highlight a {
    color: white;
    text-decoration: underline;
}

.card-button {
    display: inline-block;
    background: var(--accent-primary);
    color: white !important;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.card-button:hover {
    background: var(--accent-secondary);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.content-card.highlight .card-button {
    background: white;
    color: #f5576c !important;
}

.content-card.highlight .card-button:hover {
    background: #f8f9fa;
}

.password {
    color: #e74c3c;
    font-weight: 700;
    background: #ffe5e5;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 1.1rem;
}

[data-theme="dark"] .password {
    background: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
}

.password-note {
    margin-top: 1rem;
    font-size: 1rem;
}

.new-badge {
    display: inline-block;
    background: #2ecc71;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1rem;
}

.content-card.highlight .new-badge {
    background: rgba(255, 255, 255, 0.3);
}

/* Apps Section */
.apps-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 40px var(--card-shadow);
    transition: all 0.3s ease;
}

.apps-heading {
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    transition: color 0.3s ease;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

[data-theme="dark"] .app-card {
    background: rgba(255, 255, 255, 0.05);
}

.app-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 30px var(--card-shadow-hover);
}

.app-card .app-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.app-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.app-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    transition: color 0.3s ease;
}

/* Thanks Section */
.thanks-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 40px var(--card-shadow);
    transition: all 0.3s ease;
}

.thanks-section p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-style: italic;
    transition: color 0.3s ease;
}

/* Contact section */
.contact {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 10px 40px var(--card-shadow);
    transition: all 0.3s ease;
}

.contact h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.email-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 1rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    max-width: 100%;
    word-break: break-word;
}

[data-theme="dark"] .email-link {
    background: rgba(255, 255, 255, 0.05);
}

.email-link:hover {
    color: var(--accent-secondary);
    transform: translateY(-3px);
    background: #e9ecef;
}

[data-theme="dark"] .email-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.email-icon {
    font-size: 2rem;
}

.contact-subtitle {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: color 0.3s ease;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--card-shadow-hover);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-secondary);
    transform: translateY(-5px);
}

.back-to-top:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
}

/* Footer */
footer {
    background: rgba(44, 62, 80, 0.98);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    transition: background 0.3s ease;
}

[data-theme="dark"] footer {
    background: rgba(10, 10, 15, 0.98);
}

footer p {
    margin: 0;
    font-size: 1rem;
}

/* Print styles */
@media print {
    body {
        background: white;
    }

    body::before {
        display: none;
    }

    .dark-mode-toggle,
    .back-to-top,
    .skip-link {
        display: none !important;
    }

    header,
    section,
    .content-card {
        box-shadow: none;
        page-break-inside: avoid;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* Responsive design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .dark-mode-toggle {
        top: 1.5rem !important;
        right: 1.5rem !important;
        width: 45px;
        height: 45px;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .content-card {
        padding: 2rem 1.5rem;
    }

    section {
        margin-bottom: 2rem;
    }

    .back-to-top {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 1rem;
        right: 1rem;
    }

    .email-link {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 10px;
    }

    .hero {
        padding: 3rem 1.5rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .content-card {
        padding: 1.5rem;
    }

    .announcement-box {
        flex-direction: column;
    }

    .dark-mode-toggle {
        top: 1rem !important;
        right: 1rem !important;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .email-link {
        font-size: 1rem;
        padding: 0.8rem 1rem;
        gap: 8px;
    }

    .email-icon {
        font-size: 1.5rem;
    }
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
