/* ============================================================================
   PREMIUM COLOR GRADING SYSTEM - JAPANESE EDUCATION WEBSITE
   ============================================================================
   
   This CSS file provides a modern, premium color grading system that enhances
   the visual design of the education website while preserving all HTML structure.
   
   Color Palette:
   - Primary: #1E3A8A (Deep Indigo Blue)
   - Secondary: #7C3AED (Modern Purple)
   - Accent: #EF4444 (Soft Japanese Red)
   - Background: #F8FAFC (Soft Clean White)
   - Text: #111827 (Dark Modern Text)
   
   ============================================================================ */

:root {
    /* NEW PREMIUM COLOR SYSTEM */
    --primary-new: #1E3A8A;           /* Deep Indigo Blue */
    --secondary-new: #7C3AED;         /* Modern Purple */
    --accent-new: #EF4444;            /* Soft Japanese Red */
    --bg-new: #F8FAFC;                /* Soft Clean White */
    --text-new: #111827;              /* Dark Modern Text */
    
    /* Extended Color Palette */
    --primary-light: #3B5BDB;         /* Light Indigo */
    --primary-lighter: #5B7FE8;       /* Lighter Indigo */
    --secondary-light: #A78BFA;       /* Light Purple */
    --accent-light: #F87171;          /* Light Red */
    --accent-lighter: #FCA5A5;        /* Lighter Red */
    
    /* Neutral Grays - Premium Refined */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Premium Gradients */
    --gradient-primary: linear-gradient(135deg, #1E3A8A 0%, #3B5BDB 100%);
    --gradient-secondary: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    --gradient-accent: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    --gradient-soft: linear-gradient(135deg, #F8FAFC 0%, #F3F4F6 100%);
    --gradient-mixed: linear-gradient(135deg, #1E3A8A 0%, #7C3AED 50%, #EF4444 100%);
    
    /* Enhanced Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(30, 58, 138, 0.05);
    --shadow-sm: 0 2px 4px 0 rgba(30, 58, 138, 0.08);
    --shadow-md: 0 4px 12px 0 rgba(30, 58, 138, 0.12);
    --shadow-lg: 0 12px 24px 0 rgba(30, 58, 138, 0.15);
    --shadow-xl: 0 20px 40px 0 rgba(30, 58, 138, 0.2);
    --shadow-2xl: 0 30px 60px 0 rgba(30, 58, 138, 0.25);
    --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   GLOBAL OVERRIDES - Maintain existing structure, enhance colors
   ============================================================================ */

body {
    background-color: var(--bg-new);
    color: var(--text-new);
}

/* ============================================================================
   NAVBAR & HEADER ENHANCEMENTS
   ============================================================================ */

.navbar {
    background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
    border-bottom: 1px solid rgba(30, 58, 138, 0.08);
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.06);
    transition: all var(--transition-base);
}

.navbar:hover {
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.1);
}

.navbar-brand {
    color: var(--primary-new);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-brand:hover {
    color: var(--secondary-new);
}

/* ============================================================================
   BUTTON ENHANCEMENTS
   ============================================================================ */

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #1E3A8A 0%, #2E4A9E 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    font-weight: 600;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--gradient-accent);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    font-weight: 600;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #EF4444 0%, #F97316 100%);
}

.btn-outline {
    border: 2px solid var(--primary-new);
    color: var(--primary-new);
    background: transparent;
    transition: all var(--transition-base);
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--primary-new);
    color: white;
    box-shadow: var(--shadow-md);
}

/* ============================================================================
   SECTION BACKGROUNDS & SEPARATIONS
   ============================================================================ */

.section {
    position: relative;
    transition: background-color var(--transition-base);
}

.section:nth-child(odd) {
    background: var(--bg-new);
}

.section:nth-child(even) {
    background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
}

.section-header {
    color: var(--text-new);
}

.section-header h2 {
    background: linear-gradient(135deg, var(--primary-new) 0%, var(--secondary-new) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -1px;
}

.section-tag {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: var(--secondary-new);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 9999px;
    padding: 6px 16px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================================================
   CARD & COMPONENT ENHANCEMENTS
   ============================================================================ */

.card {
    background: white;
    border: 1px solid rgba(30, 58, 138, 0.08);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    border-bottom: 1px solid rgba(30, 58, 138, 0.08);
    padding: 20px;
    color: var(--primary-new);
    font-weight: 700;
}

.card-body {
    padding: 24px;
    color: var(--text-new);
}

.card-footer {
    background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
    border-top: 1px solid rgba(30, 58, 138, 0.08);
    padding: 16px 24px;
}

/* ============================================================================
   FEATURE CARDS & BOXES
   ============================================================================ */

.feature-card {
    background: white;
    border: 1px solid rgba(30, 58, 138, 0.08);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-new);
    font-size: 28px;
    margin-bottom: 16px;
    transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--primary-new) 0%, var(--secondary-new) 100%);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* ============================================================================
   TESTIMONIAL & QUOTE SECTIONS
   ============================================================================ */

.testimonial {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    border-left: 4px solid var(--secondary-new);
    border-radius: 8px;
    padding: 24px;
    transition: all var(--transition-base);
}

.testimonial:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.testimonial-author {
    color: var(--primary-new);
    font-weight: 700;
}

/* ============================================================================
   PROGRESS BARS & INDICATORS
   ============================================================================ */

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.progress-bar::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-track {
    background: var(--gray-200);
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
}

/* ============================================================================
   BADGE & LABEL ENHANCEMENTS
   ============================================================================ */

.badge {
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 6px 12px;
    transition: all var(--transition-base);
}

.badge-primary {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1) 0%, rgba(59, 91, 219, 0.1) 100%);
    color: var(--primary-new);
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.badge-secondary {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%);
    color: var(--secondary-new);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.1) 100%);
    color: var(--accent-new);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================================================================
   INPUT & FORM ENHANCEMENTS
   ============================================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-base);
    background: white;
    color: var(--text-new);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-new);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    background: linear-gradient(135deg, rgba(248, 250, 252, 1) 0%, rgba(243, 244, 246, 1) 100%);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
    color: var(--gray-400);
}

/* ============================================================================
   LINK & ANCHOR ENHANCEMENTS
   ============================================================================ */

a {
    color: var(--primary-new);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
}

a:hover {
    color: var(--secondary-new);
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

a:hover::after {
    width: 100%;
}

/* ============================================================================
   DIVIDER & SEPARATOR ENHANCEMENTS
   ============================================================================ */

hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
    margin: 32px 0;
}

/* ============================================================================
   HERO SECTION ENHANCEMENTS
   ============================================================================ */

.hero {
    background: linear-gradient(135deg, var(--bg-new) 0%, #EFF6FF 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

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

.hero h1 {
    color: var(--text-new);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero h1 .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--gray-600);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 600px;
}

/* ============================================================================
   TABLE ENHANCEMENTS
   ============================================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

thead {
    background: linear-gradient(135deg, var(--primary-new) 0%, var(--secondary-new) 100%);
    color: white;
}

thead th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    letter-spacing: 0.5px;
}

tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

tbody tr:hover {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
}

tbody td {
    padding: 16px;
    color: var(--text-new);
}

/* ============================================================================
   LIST ENHANCEMENTS
   ============================================================================ */

ul, ol {
    color: var(--text-new);
}

li {
    margin-bottom: 12px;
    line-height: 1.8;
}

ul li::marker {
    color: var(--primary-new);
    font-weight: 700;
}

ol li::marker {
    color: var(--secondary-new);
    font-weight: 700;
}

/* ============================================================================
   BLOCKQUOTE ENHANCEMENTS
   ============================================================================ */

blockquote {
    border-left: 4px solid var(--secondary-new);
    padding-left: 24px;
    margin: 24px 0;
    color: var(--gray-600);
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.8;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(30, 58, 138, 0.05) 100%);
    padding: 20px 24px;
    border-radius: 8px;
}

/* ============================================================================
   CODE & SYNTAX ENHANCEMENTS
   ============================================================================ */

code {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    color: var(--primary-new);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

pre {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    color: #E5E7EB;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.125rem;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 16px;
    }
    
    .card {
        border-radius: 8px;
    }
}

/* ============================================================================
   ANIMATION & TRANSITION UTILITIES
   ============================================================================ */

.fade-in {
    animation: fadeIn var(--transition-slow) ease-out;
}

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

.slide-in-left {
    animation: slideInLeft var(--transition-slow) ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight var(--transition-slow) ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scale-in {
    animation: scaleIn var(--transition-slow) ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-primary {
    color: var(--primary-new);
}

.text-secondary {
    color: var(--secondary-new);
}

.text-accent {
    color: var(--accent-new);
}

.text-muted {
    color: var(--gray-500);
}

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

.bg-secondary {
    background: var(--secondary-new);
    color: white;
}

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

.bg-light {
    background: var(--bg-new);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

.rounded-sm {
    border-radius: 4px;
}

.rounded-md {
    border-radius: 8px;
}

.rounded-lg {
    border-radius: 12px;
}

.rounded-xl {
    border-radius: 16px;
}

.rounded-full {
    border-radius: 9999px;
}

.transition-fast {
    transition: all var(--transition-fast);
}

.transition-base {
    transition: all var(--transition-base);
}

.transition-slow {
    transition: all var(--transition-slow);
}

/* ============================================================================
   SMOOTH SCROLLING & PERFORMANCE
   ============================================================================ */

html {
    scroll-behavior: smooth;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ============================================================================
   DARK MODE SUPPORT (Optional - for future enhancement)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-new: #0F172A;
        --text-new: #F1F5F9;
        --gray-50: #1E293B;
        --gray-100: #334155;
        --gray-200: #475569;
    }
    
    body {
        background: var(--bg-new);
        color: var(--text-new);
    }
    
    .card {
        background: #1E293B;
        border-color: rgba(124, 58, 237, 0.2);
    }
}
