/**
 * Tasktorium Website - Main Stylesheet
 * Consolidated styles for all pages
 */

/* ========== VARIABLES ========== */
:root {
    --gradient-start: #5EC4FF;
    --gradient-end: #E066FF;
    --primary-color: #3B82F6;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-light: #6B7280;
    --transition-speed: 0.3s;
}

/* ========== BASE STYLES ========== */
body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    color: #374151;
    line-height: 1.5;
}

.app-background {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    background-attachment: fixed;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    z-index: -1;
}

/* ========== ACCESSIBILITY ========== */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
}

.skip-to-content:focus {
    left: 50%;
    transform: translateX(-50%);
}

/* ========== COMPONENTS ========== */

/* Glass Card */
.glass-card {
    background-color: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed) ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* Buttons */
.primary-button {
    background-color: var(--primary-color);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.primary-button:hover {
    filter: brightness(110%);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.primary-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 0;
}

.primary-button:hover::after {
    width: 250%;
    height: 300%;
}

.primary-button span {
    position: relative;
    z-index: 1;
}

.glass-button {
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.glass-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* Feature Cards */
.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-icon {
    transition: transform var(--transition-speed) ease;
}

/* ========== HEADER & NAVIGATION ========== */
/* Sticky Header Styling - FIXED VERSION */
.sticky-header {
    position: fixed !important; /* Überschreibt Tailwind */
    top: 0;
    left: 0;
    right: 0;
    transition: all var(--transition-speed) ease;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 999;
    width: 100%;
    height: 4rem; /* Standardhöhe */
}

.sticky-header.scrolled {
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    height: 3.5rem; /* Kleinere Höhe beim Scrollen */
}

/* Flex-Container im Header */
.sticky-header .flex {
    transition: height var(--transition-speed) ease;
    height: 4rem;
}

.sticky-header.scrolled .flex {
    height: 3.5rem;
}

/* Kompensation für fixed Header - wichtig für korrekte Positionierung des Inhalts */
body {
    padding-top: 4rem; /* Gleiche Höhe wie der Header */
}

/* Logo beim Scrollen etwas kleiner */
.sticky-header.scrolled .tasktorium-logo {
    font-size: 1.25rem;
    transition: font-size var(--transition-speed) ease;
}

/* Logo Styling */
.logo-container {
    display: flex;
    align-items: center;
}

.tasktorium-logo {
    display: inline-block;
    position: relative;
    transform: translateY(0);
    transition: transform var(--transition-speed) ease;
}

.tasktorium-logo:hover {
    transform: translateY(-2px);
}

.check-mark {
    display: inline-block;
    position: relative;
    top: -0.2em;
    left: 0.05em;
    transform: rotate(45deg) scale(0);
    width: 0.5em;
    height: 0.5em;
    border-bottom: 0.15em solid currentColor;
    border-right: 0.15em solid currentColor;
    animation: checkmark-appear 0.3s ease forwards;
    animation-delay: 0.2s;
}

@keyframes checkmark-appear {
    0% {
        transform: rotate(45deg) scale(0);
        opacity: 0;
    }
    50% {
        transform: rotate(45deg) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: rotate(45deg) scale(1);
        opacity: 1;
    }
}

/* Mobile Menu Animation */
@keyframes mobile-menu-slide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mobile-menu.open {
    animation: mobile-menu-slide 0.2s ease forwards;
}

/* ========== ERROR PAGES ========== */
.error-number {
    font-size: 8rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulsing {
    animation: pulse 3s ease-in-out infinite;
}

/* ========== LEGAL PAGES ========== */
/* Table of contents styles */
.toc-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #4B5563;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.toc-link:hover {
    color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.05);
    border-left-color: var(--primary-color);
}

.toc-link.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
    background-color: rgba(59, 130, 246, 0.05);
}

.toc-sub-link {
    display: block;
    padding: 0.5rem 1rem 0.5rem 1.5rem;
    color: #6B7280;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.toc-sub-link:hover {
    color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.05);
    border-left-color: var(--primary-color);
}

.toc-sub-link.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
    background-color: rgba(59, 130, 246, 0.05);
}

/* Legal content styles */
.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1F2937;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.legal-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #374151;
}

.legal-content p {
    margin-bottom: 1rem;
}

.legal-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ========== DOWNLOAD PAGE ========== */
/* Progress steps */
.progress-step {
    position: relative;
    z-index: 1;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -50%;
    width: 100%;
    height: 2px;
    background-color: #e5e7eb;
    z-index: -1;
}

.progress-step:first-child::before {
    display: none;
}

.progress-step.active::before {
    background-color: var(--primary-color);
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e5e7eb;
    color: #6b7280;
    font-weight: 600;
}

.step-circle.active {
    background-color: var(--primary-color);
    color: white;
}

.step-circle.completed {
    background-color: var(--success-color);
    color: white;
}

/* Version tabs */
.version-tab {
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
    font-weight: 500;
    background-color: rgba(243, 244, 246, 0.7);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-bottom: none;
}

.version-tab.active {
    background-color: white;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

.version-content {
    display: none;
    padding: 1.5rem;
    background-color: white;
    border-radius: 0 0.5rem 0.5rem 0.5rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.version-content.active {
    display: block;
}

/* System requirements table */
.system-req-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
}

.system-req-table th,
.system-req-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.system-req-table th {
    background-color: rgba(243, 244, 246, 0.7);
    font-weight: 600;
}

.system-req-table tr:last-child td {
    border-bottom: none;
}

/* Installation step cards */
.step-card {
    position: relative;
    padding-left: 3rem;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ========== NOTIFICATION BANNERS ========== */
.beta-banner {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-left: 4px solid var(--warning-color);
}

/* ========== ANIMATIONS ========== */
/* Background gradient animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(-45deg, var(--gradient-start), var(--gradient-end), #60a5fa, #8b5cf6);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

/* Page transition animations */
.page-transition {
    animation: fade-in 0.4s ease-out;
}

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

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 768px) {
    .glass-card:hover {
        transform: none;
    }
    
    .error-number {
        font-size: 6rem;
    }
}

@media (min-width: 1024px) {
    .lg\:hover\:translate-y-2:hover {
        transform: translateY(-8px);
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .glass-card {
        box-shadow: none !important;
        background: white !important;
        break-inside: avoid;
    }
    
    .no-print {
        display: none !important;
    }
    
    body::after {
        content: none !important;
    }
    
    a {
        text-decoration: underline;
        color: #000 !important;
    }
}