/* Üçgende Katlama Yöntemi Stilleri */
.triangle-folding-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.folding-header {
    text-align: center;
    margin-bottom: 2rem;
}

.folding-header h1 {
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.folding-header p {
    color: #64748b;
    font-size: 1.1rem;
}

/* İnteraktif Demo Bölümü */
.interactive-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
}

.demo-main {
    display: flex;
    flex-direction: column;
}

.canvas-container {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#triangleCanvas {
    max-width: 100%;
    height: auto;
}

.status-bar {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.status-bar p {
    color: #334155;
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

.demo-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.demo-btn {
    padding: 0.75rem 1.5rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

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

.demo-btn.active {
    background: #059669;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.animate-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
    margin-left: auto;
}

.animate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Bilgi Paneli */
.demo-info {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #f59e0b;
}

.info-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 1rem;
}

.info-description {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
}

.step-num {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f59e0b;
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Kural Kartları */
.rules-section {
    margin-bottom: 2rem;
}

.rules-section h2 {
    text-align: center;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.rule-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.rule-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.3s;
}

.rule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.rule-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.rule-header.kenarortay { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.rule-header.aciortay { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.rule-header.yukseklik { background: linear-gradient(135deg, #fee2e2, #fecaca); }

.rule-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.rule-header h3 {
    color: #1e293b;
    margin: 0;
    font-size: 1.2rem;
}

.rule-body {
    padding: 1.25rem;
}

.rule-formula {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.formula-action {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.formula-result {
    background: #d1fae5;
    color: #065f46;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.9rem;
}

.rule-body p {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.rule-note {
    color: #8b5cf6 !important;
    font-size: 0.9rem !important;
    font-style: italic;
}

/* Özet Tablo */
.summary-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.summary-section h2 {
    text-align: center;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.summary-table {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.table-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    border-bottom: 1px solid #e2e8f0;
}

.table-row:last-child {
    border-bottom: none;
}

.table-header {
    background: #1e293b;
    color: white;
    font-weight: 600;
}

.table-cell {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
}

.table-row:not(.table-header):nth-child(even) {
    background: #f8fafc;
}

.highlight-orange { color: #d97706; font-weight: 600; }
.highlight-blue { color: #2563eb; font-weight: 600; }
.highlight-red { color: #dc2626; font-weight: 600; }

/* Hatırlatma Kartları */
.memory-section {
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.memory-section h2 {
    text-align: center;
    color: white;
    margin-bottom: 1.5rem;
}

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

.memory-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.memory-card:hover {
    transform: scale(1.03);
}

.memory-formula {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.memory-orange .memory-formula { color: #d97706; }
.memory-blue .memory-formula { color: #2563eb; }
.memory-red .memory-formula { color: #dc2626; }

.memory-result {
    font-size: 1rem;
    font-weight: 600;
    color: #059669;
    margin-bottom: 0.5rem;
}

.memory-hint {
    font-size: 0.85rem;
    color: #94a3b8;
    font-style: italic;
}

/* Responsive */
@media (max-width: 900px) {
    .interactive-section {
        grid-template-columns: 1fr;
    }
    
    .demo-info {
        border-left: none;
        border-top: 4px solid #f59e0b;
    }
}

@media (max-width: 768px) {
    .folding-header h1 {
        font-size: 1.6rem;
    }
    
    .demo-controls {
        flex-direction: column;
    }
    
    .demo-btn, .animate-btn {
        width: 100%;
        margin-left: 0;
    }
    
    .rule-cards {
        grid-template-columns: 1fr;
    }
    
    .table-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .table-header {
        display: none;
    }
    
    .table-row:not(.table-header) {
        border-radius: 8px;
        margin-bottom: 0.5rem;
        border: 1px solid #e2e8f0;
    }
    
    .table-cell {
        padding: 0.75rem 1rem;
    }
    
    .table-cell:first-child {
        background: #f8fafc;
        font-weight: 500;
    }
}
