/* Graph Visualization Page Styles */

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-header h1 {
    font-family: 'Beckan', 'Inter', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.page-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-dark);
    opacity: 0.8;
    font-weight: 400;
}

/* Controls Section */
.controls-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.controls-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Button Styles */
.btn-primary, .btn-secondary, .btn-tertiary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a5a30 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(21, 71, 38, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 71, 38, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary-color);
    border: 2px solid var(--accent-gold);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-tertiary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    border: 1px solid rgba(21, 71, 38, 0.2);
}

.btn-tertiary:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Slider Controls */
.slider-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-group label span {
    background: rgba(212, 175, 55, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'Inter', monospace;
    font-weight: 600;
}

.slider-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(21, 71, 38, 0.1);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-gold);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-color);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-gold);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-group input[type="range"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Metrics Section */
.metrics-section {
    margin-bottom: 2rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Beckan', 'Inter', sans-serif;
    line-height: 1.2;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-dark);
    opacity: 0.7;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Graph Section */
.graph-section {
    margin-bottom: 2rem;
}

.graph-container {
    width: 100%;
    height: 600px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 2px dashed rgba(21, 71, 38, 0.2);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.graph-container svg {
    border-radius: 16px;
}

/* Empty State */
.empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-dark);
    opacity: 0.6;
    padding: 2rem;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.empty-state p {
    font-size: 1rem;
    max-width: 300px;
    line-height: 1.5;
}

/* Legend Section */
.legend-section {
    margin-bottom: 2rem;
}

.legend-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.legend-container h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Beckan', 'Inter', sans-serif;
}

.legend-items {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Sample Data Section */
.sample-data-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.sample-data-section h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Beckan', 'Inter', sans-serif;
}

.sample-data-section p {
    font-size: 0.95rem;
    color: var(--text-dark);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.sample-data-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Graph Visualization Specific Styles */
.graph-container .legend {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(21, 71, 38, 0.1);
}

.graph-container text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    pointer-events: none;
}

.graph-container line {
    transition: stroke-opacity 0.3s ease;
}

.graph-container circle {
    transition: r 0.2s ease, stroke-width 0.2s ease;
    cursor: pointer;
}

.graph-container circle:hover {
    stroke-width: 3px;
    filter: brightness(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .controls-container {
        gap: 1rem;
    }
    
    .control-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-primary, .btn-secondary, .btn-tertiary {
        width: 100%;
        justify-content: center;
    }
    
    .slider-controls {
        grid-template-columns: 1fr;
    }
    
    .graph-container {
        height: 400px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sample-data-actions {
        flex-direction: column;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Loading State */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--accent-gold);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
button, input, .metric-card, .legend-item {
    transition: all 0.2s ease;
}

/* Easter Egg: GIN mode */
.gin-mode-active {
    animation: ginBlink 0.3s infinite alternate !important;
}

@keyframes ginBlink {
    0% {
        background-color: #00ff00 !important;
        filter: hue-rotate(0deg) saturate(3) brightness(1.5) !important;
    }
    100% {
        background-color: #ff0066 !important;
        filter: hue-rotate(180deg) saturate(3) brightness(1.5) !important;
    }
}

.gin-mode-active *,
.gin-mode-active::before,
.gin-mode-active::after {
    animation: ginTextBlink 0.3s infinite alternate !important;
    border-color: currentColor !important;
}

@keyframes ginTextBlink {
    0% {
        color: #000000 !important;
        text-shadow: 0 0 20px #00ff00, 0 0 40px #00ff00 !important;
        background-color: rgba(0, 255, 0, 0.3) !important;
        transform: scale(1.02) !important;
    }
    100% {
        color: #ffffff !important;
        text-shadow: 0 0 20px #ff0066, 0 0 40px #ff0066 !important;
        background-color: rgba(255, 0, 102, 0.3) !important;
        transform: scale(0.98) !important;
    }
}

.gin-mode-active button,
.gin-mode-active input,
.gin-mode-active .card,
.gin-mode-active .metric-card,
.gin-mode-active .control-group {
    animation: ginPulse 0.3s infinite alternate !important;
}

@keyframes ginPulse {
    0% {
        box-shadow: 0 0 30px #00ff00, inset 0 0 20px #00ff00 !important;
        border: 2px solid #00ff00 !important;
    }
    100% {
        box-shadow: 0 0 30px #ff0066, inset 0 0 20px #ff0066 !important;
        border: 2px solid #ff0066 !important;
    }
}