:root {
    /* Primary Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-hover: #1d4ed8;
    --primary-shadow: rgb(37 99 235 / 25%);
    
    /* Legacy Primary (for backward compatibility) */
    --primary-color: var(--primary);
    --primary-color-light: var(--primary-light);
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --accent: #36cfc9;
    
    /* Legacy Semantic (for backward compatibility) */
    --success-color: var(--success);
    --warning-color: var(--warning);
    --danger-color: var(--danger);
    
    /* Surface Colors */
    --surface: #ffffff;
    --surface-muted: #f4f6fb;
    --surface-elevated: #ffffff;
    --background: #f8fafc;
    
    /* Legacy Surface (for backward compatibility) */
    --surface-color: var(--surface);
    --light-bg: var(--background);
    --secondary-bg: #e2e8f0;
    
    /* Border Colors */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-dark: #cbd5e1;
    
    /* Legacy Border (for backward compatibility) */
    --border-color: var(--border);
    
    /* Text Colors */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-inverse: #ffffff;
    
    /* Legacy Text (for backward compatibility) */
    --text-primary: var(--text-main);
    --text-secondary: var(--text-muted);
    --secondary-color: #334155;
    
    /* Shadow System */
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.08);
    --shadow-md: 0 4px 12px rgb(15 23 42 / 0.08);
    --shadow-lg: 0 12px 24px rgb(15 23 42 / 0.12);
    --shadow-xl: 0 20px 25px rgb(15 23 42 / 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Layout */
    --max-width-reading: 720px;
    --max-width-content: 1200px;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    
    /* Angle Converter Variables (for educational content styling) */
    --angle-primary: #2563eb;
    --angle-primary-dark: #1d4ed8;
    --angle-accent: #0ea5e9;
    --angle-surface: #ffffff;
    --angle-border: #e2e8f0;
    --angle-text: #0f172a;
    --angle-muted: #64748b;
    --angle-success: #22c55e;
    --angle-radius-lg: 1.5rem;
    --angle-radius-md: 1rem;
    --angle-radius-sm: 0.75rem;
    --angle-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --angle-shadow-lg: 0 30px 60px rgba(37, 99, 235, 0.12);
}

.generator-page {
    padding: 2rem 0;
}

.generator-intro {
    margin-bottom: 3rem;
}

.generator-title {
    font-size: clamp(2.25rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

.generator-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin: 0 0 1rem;
    max-width: 860px;
}

.generator-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
}

.meta-chip {
    background: var(--surface-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.45rem 0.95rem;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.generator-main {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.generator-card {
    padding: 0rem 2rem;
    height: 100%;
}

.generator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.label-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.generator-input,
.generator-select {
    width: 100%;
    padding: 1rem 1.15rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    background: var(--surface-color);
    box-shadow: inset 0 1px 2px rgb(15 23 42 / 0.04);
}

.generator-input:focus,
.generator-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-shadow);
}

.generator-input:hover,
.generator-select:hover {
    border-color: var(--border-dark);
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.status-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.status-bar svg {
    flex-shrink: 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.generate-btn {
    flex: 1;
    min-width: 160px;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-shadow);
}

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

.ghost-btn {
    min-width: 160px;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ghost-btn:hover {
    background: var(--surface-muted);
    border-color: var(--border-dark);
}

.results-container {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid rgba(148, 163, 184, 0.25);
    min-height: 400px;
}

.results-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.color-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.color-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.color-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.color-preview {
    width: 100%;
    height: 180px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.color-preview:hover .copy-overlay {
    opacity: 1;
}

.color-info {
    padding: 1.25rem;
    background: var(--surface-color);
}

.color-code {
    font-size: 0.85rem;
    margin: 0.25rem 0;
    word-break: break-all;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.color-code:hover {
    background: var(--surface-muted);
}

.color-code strong {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 45px;
}

.color-code-value {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.copy-buttons-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.copy-buttons-row .copy-button {
    flex: 1 1 auto;
    min-width: 140px;
}

.copy-button {
    width: 49%;
    background: #f1f5f9;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #405063 !important;
    border: 1px solid #dde3e7;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.copy-button:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.copy-button.copied {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff !important;
}

.copy-button svg {
    width: 16px;
    height: 16px;
}

.share-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.share-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.share-x {
    background: #000000;
    color: white;
}

.share-x:hover {
    background: #333333;
}

.share-facebook {
    background: #1877f2;
    color: white;
}

.share-facebook:hover {
    background: #166fe5;
}

.share-linkedin {
    background: #0a66c2;
    color: white;
}

.share-linkedin:hover {
    background: #095d9e;
}

.share-reddit {
    background: #ff4500;
    color: white;
}

.share-reddit:hover {
    background: #e63e00;
}

.share-telegram {
    background: #0088cc;
    color: white;
}

.share-telegram:hover {
    background: #0077b5;
}

.share-whatsapp {
    background: #25d366;
    color: white;
}

.share-whatsapp:hover {
    background: #20ba5a;
}

.copy-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    z-index: 10000;
    transition: transform 0.3s ease-out;
    box-shadow: var(--shadow-lg);
    font-weight: 600;
}

.copy-notification.show {
    transform: translateX(-50%) translateY(0);
}

.copy-notification.error {
    background: var(--danger);
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-trigger {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--text-secondary);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.tooltip-trigger:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--text-main);
    color: white;
    text-align: center;
    border-radius: 0.5rem;
    padding: 0.75rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: var(--shadow-lg);
}

.tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-main) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

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

/* Educational Content Styles */
.angle-seo-section {
    padding: 2rem 0;
}

.angle-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.angle-education-card h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.angle-education-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.angle-education-card p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.angle-education-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.angle-education-card a:hover {
    border-bottom-color: var(--primary);
}

/* Infographic Styles */
.infographic-timeline {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--surface-muted);
    border-radius: var(--radius-lg);
}

.infographic-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 2rem;
}

.timeline-container {
    max-width: 100%;
    overflow-x: auto;
}

.timeline-items {
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    flex-wrap: wrap;
}

.timeline-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.timeline-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-icon svg {
    width: 100%;
    height: 100%;
}

.timeline-era {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-years {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.timeline-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.infographic-conversion-formula {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.formula-box {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.formula-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.formula-label {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.formula-content {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.formula-example {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 992px) {
    .generator-card {
        padding: 0 1rem;
    }
    
    .color-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .timeline-items {
        flex-direction: column;
    }
    
    .timeline-item {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .generator-page {
        padding: 1rem 0;
    }
    
    .generator-main {
        padding: 1.5rem;
    }
    
    .generator-card {
        padding: 0;
        margin-bottom: 2rem;
    }
    
    .color-results-grid {
        grid-template-columns: 1fr;
    }
    
    .color-preview {
        height: 200px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .generate-btn,
    .ghost-btn {
        width: 100%;
    }
    
    .copy-buttons-row {
        flex-direction: column;
    }

    .copy-buttons-row .copy-button {
        width: 100%;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .angle-card {
        padding: 1.5rem;
    }
    
    .infographic-conversion-formula {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .generator-title {
        font-size: 1.75rem;
    }
    
    .generator-subtitle {
        font-size: 1rem;
    }
    
    .color-preview {
        height: 150px;
    }
    
    .tooltiptext {
        width: 150px;
        margin-left: -75px;
    }
}

