/* ================================
   Doğru Grafiği Çizici Stilleri
   ================================ */

.grapher-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Sol Taraf - Kontroller */
.grapher-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.input-section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.4rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.equation-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s;
}

.equation-input:focus {
    outline: none;
    border-color: #3498db;
}

.examples {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.examples p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-example {
    padding: 0.4rem 0.8rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-example:hover {
    background: #e9ecef;
    border-color: #3498db;
    color: #3498db;
}

/* Hata Mesajı */
.error-message {
    background: #fee;
    border-left: 4px solid #e74c3c;
    padding: 1rem;
    border-radius: 4px;
    color: #c0392b;
}

/* Çözüm Adımları */
.solution-steps {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.solution-steps h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.step-content {
    min-height: 150px;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.step-content h4 {
    color: #3498db;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.step-content .math-expression {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.step-content .explanation {
    color: #555;
    margin-top: 0.5rem;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.step-indicator {
    font-weight: bold;
    color: #3498db;
    font-size: 1rem;
}

/* Özet Bilgiler */
.equation-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.equation-summary h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

#summary-content {
    display: grid;
    gap: 0.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: bold;
    opacity: 0.9;
}

.summary-value {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

/* Sağ Taraf - Grafik */
.grapher-canvas-container {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.canvas-wrapper {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.canvas-wrapper h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
    text-align: center;
}

#graph-canvas {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.canvas-info {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Zoom Butonu */
.zoom-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(52, 152, 219, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 10;
}

.zoom-button:hover {
    background: rgba(41, 128, 185, 0.95);
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.zoom-button svg {
    display: block;
}

/* Tam Ekran Modal */
.graph-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.graph-modal.active {
    display: flex;
}

.graph-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.modal-close-btn:hover {
    background: #c0392b;
    transform: rotate(90deg) scale(1.1);
}

.modal-close-btn svg {
    display: block;
}

#modal-title {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

#graph-canvas-large {
    max-width: 100%;
    max-height: calc(95vh - 120px);
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

/* Responsive Tasarım */
@media (max-width: 1024px) {
    .grapher-layout {
        grid-template-columns: 1fr;
    }
    
    .grapher-canvas-container {
        position: static;
    }
    
    .graph-modal-content {
        padding: 1rem;
    }
    
    #modal-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .step-navigation {
        flex-direction: column;
    }
    
    #graph-canvas {
        width: 100%;
        height: auto;
    }
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.solution-steps,
.equation-summary {
    animation: fadeIn 0.4s ease-out;
}

/* Buton Stilleri */
.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #2980b9;
}
