/* ===================================
    Modern Charge Page Styles
    Version: 1.0
    Features: Glass Morphism, Animations, Enhanced Pricing
====================================== */

/* CSS Variables */
:root {
    /* Primary Colors */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #7c8ff1;
    --secondary-color: #764ba2;
    --accent-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --info-color: #4299e1;
    --success-color: #48bb78;
    
    /* Neutral Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    
    /* Effects */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
    
    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-in-out;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

/* Enhanced Hero Section */
.modern-hero {
    background: var(--primary-gradient);
    color: white;
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.modern-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

.modern-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--bg-secondary), transparent);
}

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

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 1rem;
    animation: fadeInUp 1s ease-out;
}

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

/* Calculator Section Enhancement */
.calculator-section {
    padding: 80px 0;
    background: var(--bg-primary);
    position: relative;
}

.calculator-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 50px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-top: -80px;
    z-index: 10;
}

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

.calculator-title {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
    text-align: center;
}

.calculator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.form-group {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease-out;
}

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

.form-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.form-control {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    line-height: 1.5;
    min-height: 52px;
    transition: var(--transition-base);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: var(--primary-light);
}

/* Enhanced Select */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23667eea' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 45px;
    cursor: pointer;
}

/* Number Input Enhancement */
input[type="number"].form-control {
    -moz-appearance: textfield;
}

input[type="number"].form-control::-webkit-outer-spin-button,
input[type="number"].form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}

/* Enhanced Calculate Button */
.calculate-btn {
    display: block;
    width: 100%;
    padding: 18px 32px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.calculate-btn:hover::before {
    width: 600px;
    height: 600px;
}

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

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

/* Enhanced Result Section */
.result-section {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-top: 40px;
    color: white;
    animation: slideIn 0.5s ease-out;
    box-shadow: var(--shadow-xl);
}

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

.result-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

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

.result-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition-base);
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
}

.result-value small {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
    margin-left: 5px;
}

.result-value.discount {
    color: #ffd700;
}

.result-value.highlight {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Pricing Section Enhancement */
.pricing-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Enhanced Pricing Table */
.pricing-table-wrapper {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    margin-bottom: 60px;
    border: 1px solid var(--border-color);
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
}

.pricing-table thead {
    background: var(--primary-gradient);
    color: white;
}

.pricing-table th {
    padding: 25px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-table th:last-child {
    border-right: none;
}

.pricing-table tbody tr {
    transition: var(--transition-base);
    border-bottom: 1px solid var(--border-color);
}

.pricing-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    transform: scale(1.01);
}

.pricing-table tbody tr:last-child {
    border-bottom: none;
}

.pricing-table td {
    padding: 20px;
    text-align: center;
    font-size: 0.95rem;
    border-right: 1px solid var(--border-color);
}

.pricing-table td:last-child {
    border-right: none;
}

.pricing-table td b {
    color: var(--primary-color);
    font-weight: 600;
}

/* Table Highlight Animation */
.pricing-table tbody tr.highlighted {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15)) !important;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    animation: highlightPulse 0.5s ease;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
    100% {
        transform: scale(1.02);
        opacity: 1;
    }
}

.pricing-table tbody tr.highlighted td {
    font-weight: 600;
    color: var(--primary-color);
}

/* Enhanced Info Cards */
.info-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 35px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

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

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.info-card h6 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.info-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 12px 0;
}

.info-card p strong {
    color: var(--primary-color);
    font-weight: 600;
}

.example-box {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: var(--radius-sm);
}

.example-box p {
    margin: 8px 0;
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05rem;
}

/* Enhanced CTA Button */
.cta-button {
    display: inline-block;
    padding: 18px 50px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.125rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 400px;
    height: 400px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    color: white;
}

/* Download Section Enhancement */
.download-section {
    padding: 80px 0;
    background: white;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.download-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
}

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

.download-card:hover {
    transform: translateY(-10px);
    background: white;
    box-shadow: var(--shadow-xl);
}

.download-card img {
    max-width: 100px;
    height: auto;
    margin-bottom: 25px;
    transition: var(--transition-base);
}

.download-card:hover img {
    transform: scale(1.1) rotate(5deg);
}

.download-card h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.download-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition-base);
    font-size: 0.95rem;
}

.download-btn:hover {
    transform: scale(1.05);
    color: white;
    box-shadow: var(--shadow-md);
}

.download-btn i {
    margin-right: 8px;
}

.note-text {
    text-align: center;
    color: var(--text-muted);
    margin-top: 40px;
    font-size: 0.95rem;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.note-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
}

.note-text a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calculator-form {
        grid-template-columns: 1fr;
    }
    
    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .modern-hero {
        padding: 80px 0 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .calculator-card {
        padding: 30px 20px;
        margin-top: -60px;
    }
    
    .calculator-title {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .pricing-table {
        font-size: 0.85rem;
    }
    
    .pricing-table th,
    .pricing-table td {
        padding: 15px 10px;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 25px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-button {
        padding: 15px 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .calculator-card {
        padding: 25px 15px;
    }
    
    .pricing-table {
        font-size: 0.75rem;
    }
    
    .pricing-table th,
    .pricing-table td {
        padding: 12px 8px;
    }
    
    .download-card {
        padding: 30px 20px;
    }
}

/* Print Styles */
@media print {
    .modern-hero,
    .calculate-btn,
    .download-section {
        display: none;
    }
    
    .pricing-table-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .pricing-table-wrapper,
    .calculator-card,
    .info-card {
        border: 2px solid currentColor;
    }
}

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

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}