:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-hover: #1d4ed8;
    --primary-shadow: rgb(37 99 235 / 25%);
    --primary-color: var(--primary);
    --primary-color-light: var(--primary-light);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --surface: #ffffff;
    --surface-muted: #f4f6fb;
    --background: #f8fafc;
    --surface-color: var(--surface);
    --light-bg: var(--background);
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-dark: #cbd5e1;
    --border-color: var(--border);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-inverse: #ffffff;
    --text-primary: var(--text-main);
    --text-secondary: var(--text-muted);
    --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);
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --angle-primary: #2563eb;
    --angle-primary-dark: #1d4ed8;
    --angle-surface: #ffffff;
    --angle-border: #e2e8f0;
    --angle-text: #0f172a;
    --angle-muted: #64748b;
    --angle-radius-lg: 1.5rem;
    --angle-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.color-inverter-page {
    padding: 2rem 0;
}

.color-inverter-intro {
    margin-bottom: 3rem;
}

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

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

.color-inverter-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);
}

.color-inverter-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);
    margin-bottom: 2rem;
}

.color-input-section {
    margin-bottom: 2rem;
}

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

.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;
}

.color-input,
.method-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);
}

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

.color-input:hover,
.method-select:hover {
    border-color: var(--primary-color);
}

.color-picker-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.color-picker-input {
    width: 80px;
    height: 56px;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-picker-input:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.color-preview-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.color-preview-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.preview-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.color-display {
    width: 100%;
    height: 180px;
    border-radius: var(--radius-md);
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-display:hover {
    transform: scale(1.02);
}

.color-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, #ccc 25%, transparent 25%), 
        linear-gradient(-45deg, #ccc 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #ccc 75%), 
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    z-index: 1;
}

.color-fill {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.color-values {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-value-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--light-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-value-item:hover {
    background: var(--primary-color-light);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.color-value-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.color-value-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    
}

.copy-icon {
    width: 18px;
    height: 18px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.color-value-item:hover .copy-icon {
    opacity: 1;
}

.comparison-section {
    margin-bottom: 2rem;
}

.comparison-container {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.comparison-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-align: center;
}

.color-comparison {
    display: flex;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.comparison-half {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

.comparison-half:hover {
    transform: scale(1.05);
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.method-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.method-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.method-card.active {
    background: var(--primary-color-light);
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px var(--primary-shadow);
}

.method-preview {
    width: 100%;
    height: 80px;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.method-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.method-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.action-btn {
    flex: 1 1 auto;
    min-width: 140px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: var(--text-inverse);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px var(--primary-shadow);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-success {
    background: var(--success);
    color: var(--text-inverse);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(16, 185, 129, 0.3);
}

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

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

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

.tooltip {
    position: relative;
    display: inline-flex;
}

.tooltip .tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
    font-weight: 700;
    cursor: help;
    border: none;
    font-size: 0.875rem;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: var(--text-primary);
    color: white;
    text-align: left;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    position: absolute;
    z-index: 10;
    bottom: 135%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.875rem;
    line-height: 1.4;
}

.tooltip:hover .tooltiptext,
.tooltip:focus-within .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.share-container {
    background: rgba(241, 245, 249, 0.8);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

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

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.2);
    color: #ffffff;
}

.share-x { background: #111827; }
.share-facebook { background: #1877f2; }
.share-linkedin { background: #0a66c2; }
.share-reddit { background: #ff4500; }
.share-telegram { background: #229ed9; }
.share-whatsapp { background: #25d366; color: #0f172a; }

.status-bar {
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

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

.status-info {
    background: var(--primary-color-light);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.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;
}

.angle-card {
    background: var(--angle-surface);
    border-radius: var(--angle-radius-lg);
    padding: clamp(2rem, 4vw, 2.75rem);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: var(--angle-shadow-sm);
}

.angle-education-card h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--angle-text);
    margin-bottom: 1.5rem;
}

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

.angle-education-card .h4 {
    font-size: 1.15rem;
}

.angle-education-card p {
    font-size: 1rem;
    color: var(--angle-muted);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

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

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

.infographic-timeline {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

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

.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.timeline-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
}

.timeline-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
}

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

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

.timeline-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

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

.formula-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 2px solid rgba(37, 99, 235, 0.2);
}

.formula-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.formula-example {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.toast {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-message {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 991px) {
    .color-inverter-main {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .color-inverter-page {
        padding: 1.5rem 0 2rem;
    }

    .color-inverter-meta {
        gap: 0.5rem;
    }

    .color-inverter-main {
        border-radius: 1.25rem;
    }

    .color-preview-section {
        grid-template-columns: 1fr;
    }

    .method-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .share-buttons {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .infographic-conversion-formula {
        grid-template-columns: 1fr;
    }

    .timeline-items {
        grid-template-columns: 1fr;
    }
}

@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;
    }
}

