/* ============================================
   POLANGER GRAPHICS - ULTRA MODERN FRONTEND
   Professional & Stunning Chart Display
   ============================================ */

/* === ROOT VARIABLES === */
:root {
    --chart-primary: #2c5282;
    --chart-secondary: #667eea;
    --chart-accent: #38ef7d;
    --chart-danger: #ee0979;
    
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === MAIN CONTAINER === */
.artcam-graph-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    animation: fadeInUp 0.8s ease;
}

/* === GRAPH WRAPPER === */
.artcam-graph-wrapper {
    position: relative;
    padding: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: var(--transition);
}

/* === BACKGROUND LOGOS === */
.artcam-background-logos {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.artcam-bg-logo {
    position: absolute;
    opacity: 0.04;
    filter: grayscale(100%);
    animation: logoFloat 20s ease-in-out infinite;
}


/* Logo Positions - 5 adet dengeli dağılmış */
.artcam-bg-logo-1 {
    top: 10%;
    left: 15%;
    width: 180px;
    height: auto;
    transform: rotate(-15deg);
    animation-delay: 0s;
}

.artcam-bg-logo-2 {
    top: 15%;
    right: 10%;
    width: 150px;
    height: auto;
    transform: rotate(20deg);
    animation-delay: 4s;
}

.artcam-bg-logo-3 {
    bottom: 20%;
    left: 10%;
    width: 160px;
    height: auto;
    transform: rotate(10deg);
    animation-delay: 8s;
}

.artcam-bg-logo-4 {
    bottom: 15%;
    right: 15%;
    width: 170px;
    height: auto;
    transform: rotate(-20deg);
    animation-delay: 12s;
}

.artcam-bg-logo-5 {
    top: 50%;
    left: 50%;
    width: 200px;
    height: auto;
    transform: translate(-50%, -50%) rotate(5deg);
    animation-delay: 16s;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(var(--rotate, 0deg));
    }
    50% {
        transform: translateY(-10px) rotate(calc(var(--rotate, 0deg) + 5deg));
    }
}

/* Logo için özel rotate değerleri */
.artcam-bg-logo-1 { --rotate: -15deg; }
.artcam-bg-logo-2 { --rotate: 20deg; }
.artcam-bg-logo-3 { --rotate: 10deg; }
.artcam-bg-logo-4 { --rotate: -20deg; }
.artcam-bg-logo-5 { --rotate: 5deg; }

/* İçerik üstte olsun */
.artcam-graph-title,
.artcam-graph-unit,
.artcam-graph-area {
    position: relative;
    z-index: 10;
}

.artcam-graph-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #f093fb 50%, 
        #4facfe 75%, 
        #00f2fe 100%);
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}


/* === TITLE === */
.artcam-graph-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 16px 0;
    padding: 0;
    letter-spacing: 1.5px;
    font-family: Arial, sans-serif;
    animation: titlePulse 2s ease infinite;
}

@keyframes titlePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
}

/* === UNIT INDICATOR === */
.artcam-graph-unit {
    position: absolute;
    right: 50px;
    top: 50px;
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: var(--shadow-sm);
    animation: slideInRight 0.6s ease;
}

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

/* === GRAPH AREA === */
.artcam-graph-area {
    display: flex;
    position: relative;
    margin-top: 30px;
    height: 550px;
    box-sizing: border-box;
    animation: fadeIn 1s ease 0.3s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* === Y AXIS === */
.artcam-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 50px;
    padding-right: 12px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: #5a6c7d;
    margin-bottom: 70px;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.artcam-y-label {
    height: calc(100% / 11);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
    padding: 4px 8px;
    border-radius: 6px;
    position: relative;
}

.artcam-y-label::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    width: 8px;
    height: 2px;
    background: rgba(102, 126, 234, 0.3);
}


/* === CHART AREA === */
.artcam-chart-area {
    flex: 1;
    position: relative;
    border-left: 3px solid #667eea;
    border-bottom: 3px solid #667eea;
    margin-bottom: 70px;
    background: 
        linear-gradient(to right, 
            transparent 0%, 
            rgba(102, 126, 234, 0.02) 1px, 
            transparent 1px),
        linear-gradient(to top, 
            transparent 0%, 
            rgba(102, 126, 234, 0.02) 1px, 
            transparent 1px);
    background-size: calc(100% / 16) 100%, 100% calc(100% / 10);
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 0 var(--radius-md) 0 0;
    box-shadow: inset 0 0 20px rgba(102, 126, 234, 0.05);
}

/* === GRID LINES === */
.artcam-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, 
            transparent, 
            transparent calc(100% / 11 - 1px), 
            rgba(102, 126, 234, 0.08) calc(100% / 11 - 1px), 
            rgba(102, 126, 234, 0.08) calc(100% / 11)),
        repeating-linear-gradient(90deg, 
            transparent, 
            transparent calc(100% / 16 - 1px), 
            rgba(102, 126, 234, 0.08) calc(100% / 16 - 1px), 
            rgba(102, 126, 234, 0.08) calc(100% / 16));
    opacity: 0.6;
    pointer-events: none;
}

/* === SVG LINE CHART === */
.artcam-line-chart {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    overflow: visible;
    filter: drop-shadow(0 2px 4px rgba(44, 82, 130, 0.2));
}

.artcam-data-line {
    stroke-width: 1.6;
    stroke-linejoin: round;
    stroke-linecap: round;
    fill: none;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawLine 2s ease-in-out forwards;
    filter: drop-shadow(0 1.5px 3px rgba(102, 126, 234, 0.2));
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* === DATA DOTS === */
.artcam-data-dots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    pointer-events: none;
}

.artcam-data-dots span {
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, 50%);
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(44, 82, 130, 0.3);
    animation: dotPop 0.4s ease backwards;
}

.artcam-data-dots span:nth-child(1) { animation-delay: 0.1s; }
.artcam-data-dots span:nth-child(2) { animation-delay: 0.2s; }
.artcam-data-dots span:nth-child(3) { animation-delay: 0.3s; }
.artcam-data-dots span:nth-child(4) { animation-delay: 0.4s; }
.artcam-data-dots span:nth-child(5) { animation-delay: 0.5s; }
.artcam-data-dots span:nth-child(6) { animation-delay: 0.6s; }

@keyframes dotPop {
    from {
        transform: translate(-50%, 50%) scale(0);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 50%) scale(1);
        opacity: 1;
    }
}

.artcam-data-dots span {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 4px 16px rgba(44, 82, 130, 0.5);
    z-index: 20;
}

.artcam-data-dots span::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: var(--transition);
}

.artcam-data-dots span::before {
    opacity: 1;
    width: 300%;
    height: 300%;
}

/* === VALUE LABELS === */
.artcam-value-labels {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 16;
}

.artcam-value-labels span {
    position: absolute;
    font-size: 11px;
    font-weight: 700;
    color: #667eea;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    padding: 1px 10px;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    transform: translate(-50%, -100%);
    margin-top: -12px;
	margin-bottom: -20px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.2);
    animation: labelFadeIn 0.4s ease backwards;
}

.artcam-value-labels span:nth-child(1) { animation-delay: 0.2s; }
.artcam-value-labels span:nth-child(2) { animation-delay: 0.3s; }
.artcam-value-labels span:nth-child(3) { animation-delay: 0.4s; }
.artcam-value-labels span:nth-child(4) { animation-delay: 0.5s; }
.artcam-value-labels span:nth-child(5) { animation-delay: 0.6s; }
.artcam-value-labels span:nth-child(6) { animation-delay: 0.7s; }

@keyframes labelFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -80%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -100%);
    }
}


/* === X AXIS NUMBERS === */
.artcam-x-numbers {
    position: absolute;
    bottom: 60px;
    left: 50px;
    right: 0;
    height: 24px;
    box-sizing: border-box;
}

.artcam-x-numbers span {
    position: absolute;
    font-size: 11px;
    font-weight: 600;
    color: #5a6c7d;
    font-family: Arial, sans-serif;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 6px;
}

.artcam-x-numbers span {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    transform: translateX(-50%) translateY(-2px);
}

/* === X AXIS LABELS === */
.artcam-x-labels {
    position: absolute;
    bottom: 0;
    left: 50px;
    right: 0;
    height: 55px;
    box-sizing: border-box;
}

.artcam-x-label-wrap {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #2c3e50;
    text-align: center;
    font-family: Arial, sans-serif;
    transform: translateX(-50%);
    padding: 8px 12px;
    border-radius: var(--radius-md);
}


.artcam-x-value {
    font-weight: 700;
    font-size: 12px;
    color: #667eea;
    margin: 0 0 4px 0;
    padding: 0;
    white-space: nowrap;
}

.artcam-x-type {
    font-size: 10px;
    font-weight: 600;
    color: #5a6c7d;
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .artcam-graph-container {
        margin: 30px auto;
    }
    
    .artcam-graph-wrapper {
        padding: 30px;
    }
    
    .artcam-graph-area {
        height: 450px;
    }
    
    .artcam-graph-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .artcam-graph-container {
        padding: 0 10px;
        margin: 20px auto;
    }
    
    .artcam-graph-wrapper {
        padding: 20px;
    }
    
    .artcam-graph-title {
        font-size: 18px;
        letter-spacing: 1px;
    }
    
    .artcam-graph-unit {
        font-size: 11px;
        right: 20px;
        top: 20px;
        padding: 6px 12px;
    }
    
    .artcam-graph-area {
        height: 400px;
    }
    
    .artcam-y-axis {
        width: 40px;
        font-size: 11px;
    }
    
    .artcam-x-label-wrap {
        font-size: 9px;
        padding: 6px 8px;
    }
    
    .artcam-x-value {
        font-size: 10px;
    }
    
    .artcam-x-type {
        font-size: 8px;
    }
    
    .artcam-value-labels span {
        font-size: 9px;
        padding: 4px 8px;
    }
    
    .artcam-data-dots span {
        width: 10px;
        height: 10px;
    }
}

/* === PRINT STYLES === */
@media print {
    .artcam-graph-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .artcam-graph-wrapper {
        box-shadow: none;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .artcam-graph-wrapper::before {
        display: none;
    }
}

/* === DARK MODE === */
@media (prefers-color-scheme: dark) {
    .artcam-graph-wrapper {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        border-color: rgba(102, 126, 234, 0.3);
    }
    
    .artcam-graph-title {
        background: linear-gradient(135deg, #a8b8ff 0%, #c4a4ff 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .artcam-y-label,
    .artcam-x-numbers span,
    .artcam-x-type {
        color: #b0b8c4;
    }
    
    .artcam-x-value {
        color: #a8b8ff;
    }
    
    .artcam-chart-area {
        border-color: #667eea;
        background-color: rgba(0, 0, 0, 0.2);
    }
    
    .artcam-value-labels span {
        background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
        color: #a8b8ff;
        border-color: rgba(102, 126, 234, 0.4);
    }
}

/* Keep acoustic chart visual consistent across browsers/themes */
.artcam-graph-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.artcam-chart-area {
    background-color: transparent !important;
}

.artcam-y-label,
.artcam-x-numbers span,
.artcam-x-type {
    color: #6b7280 !important;
}

.artcam-x-value {
    color: #1f2937 !important;
}

.artcam-value-labels span {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%) !important;
    color: #667eea !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
}

/* === LOADING STATE === */
.artcam-graph-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

.artcam-graph-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

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

/* === FOCUS STYLES === */
.artcam-data-dots span:focus,
.artcam-x-label-wrap:focus {
    outline: 3px solid #667eea;
    outline-offset: 4px;
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
    .artcam-graph-wrapper {
        border: 3px solid #000;
    }
    
    .artcam-chart-area {
        border-color: #000;
    }
    
    .artcam-data-line {
        stroke: #000;
        stroke-width: 1.6;
    }
    
    .artcam-data-dots span {
        background: #000;
        border-color: #fff;
    }
}
