/* ============================================================
   Demo Hesaplama Sayfası - Dark Theme
   ============================================================ */

/* Demo Page Base */
.demo-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.demo-header {
    text-align: center;
    margin-bottom: 2rem;
}

.demo-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--layout-ink, #e5e7eb);
    margin-bottom: 0.5rem;
}

.demo-subtitle {
    color: var(--layout-muted, #94a3b8);
    font-size: 1rem;
}

/* Demo Cards */
.demo-card {
    background: var(--layout-panel, rgba(15, 23, 42, 0.88));
    border-radius: 12px;
    backdrop-filter: blur(12px);
    border: 1px solid var(--layout-border, rgba(148, 163, 184, 0.18));
}

.demo-card .card-header {
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid var(--layout-border, rgba(148, 163, 184, 0.18));
    padding: 1rem 1.25rem;
    border-radius: 12px 12px 0 0;
}

.demo-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--layout-ink, #e5e7eb);
}

.demo-card .card-body {
    padding: 1.25rem;
}

/* Form Styling */
.demo-card .form-label {
    font-weight: 500;
    color: var(--layout-ink, #e5e7eb);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.demo-card .form-control {
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    border: 1px solid var(--layout-border, rgba(148, 163, 184, 0.18));
    background: rgba(15, 23, 42, 0.6);
    color: var(--layout-ink, #e5e7eb);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.demo-card .form-control::placeholder {
    color: var(--layout-muted, #94a3b8);
}

.demo-card .form-control:focus {
    border-color: var(--layout-brand, #22c55e);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    background: rgba(15, 23, 42, 0.8);
    color: var(--layout-ink, #e5e7eb);
}

.demo-card .input-group-text {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--layout-border, rgba(148, 163, 184, 0.18));
    color: var(--layout-muted, #94a3b8);
    font-size: 0.85rem;
}

/* Calculation Type Selector */
.calc-type-selector {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid var(--layout-border, rgba(148, 163, 184, 0.18));
}

.calc-type-selector .form-check-label {
    color: var(--layout-ink, #e5e7eb);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.calc-type-selector .form-check-input:checked + .form-check-label {
    background: rgba(34, 197, 94, 0.2);
    color: var(--layout-brand, #22c55e);
}

/* Validation */
.invalid-feedback {
    display: none;
    color: #f87171;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.invalid-feedback.show {
    display: block;
}

.form-control.is-invalid {
    border-color: #ef4444;
}

/* Buttons */
.demo-card .btn-primary {
    background: linear-gradient(135deg, var(--layout-brand, #22c55e), #059669);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

.demo-card .btn-primary:hover {
    background: linear-gradient(135deg, #16a34a, #047857);
    transform: translateY(-1px);
}

.demo-card .btn-outline-secondary {
    border-color: var(--layout-border, rgba(148, 163, 184, 0.3));
    color: var(--layout-muted, #94a3b8);
}

.demo-card .btn-outline-secondary:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: var(--layout-muted, #94a3b8);
    color: var(--layout-ink, #e5e7eb);
}

/* Result Placeholder */
.result-placeholder {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--layout-brand, #22c55e);
}

.placeholder-title {
    color: var(--layout-ink, #e5e7eb);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.placeholder-text {
    color: var(--layout-muted, #94a3b8);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Result Card */
.result-card {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Final Result */
.final-result {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    margin-bottom: 1.5rem;
}

.final-result-label {
    font-size: 0.9rem;
    color: var(--layout-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.final-result-value {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--layout-brand, #22c55e), var(--layout-brand-alt, #06b6d4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.final-result-badge {
    display: inline-block;
    background: rgba(34, 197, 94, 0.2);
    color: var(--layout-brand, #22c55e);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.final-result-badge.ai {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

/* Detail Results */
.detail-results {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 10px;
    padding: 1rem;
}

.detail-title {
    color: var(--layout-muted, #94a3b8);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--layout-border, rgba(148, 163, 184, 0.18));
}

.result-item {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: rgba(15, 23, 42, 0.3);
    transition: background 0.2s ease;
}

.result-item:hover {
    background: rgba(15, 23, 42, 0.5);
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.result-item-label {
    color: var(--layout-ink, #e5e7eb);
    font-size: 0.9rem;
    font-weight: 500;
}

.result-item-value {
    color: var(--layout-muted, #94a3b8);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.result-item-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-item-bar-label {
    color: var(--layout-muted, #94a3b8);
    font-size: 0.75rem;
}

.result-item-bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--layout-brand, #22c55e), #059669);
    color: #0b1220;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Alert */
.demo-card .alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    border-radius: 8px;
}

/* ============================================================
   Membership Modal - Animation
   ============================================================ */

.membership-modal-content {
    background: var(--layout-panel, rgba(15, 23, 42, 0.98));
    border: 1px solid var(--layout-border, rgba(148, 163, 184, 0.18));
    border-radius: 16px;
    backdrop-filter: blur(20px);
}

.membership-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.checkmark-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--layout-brand, #22c55e), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.checkmark-circle i {
    font-size: 3rem;
    color: #0b1220;
    animation: checkPop 0.4s ease 0.3s both;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes checkPop {
    from {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    to {
        transform: scale(1);
    }
}

/* Sparkles */
.sparkles {
    position: absolute;
    inset: -20px;
    pointer-events: none;
}

.sparkles span {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--layout-brand, #22c55e);
    border-radius: 50%;
    animation: sparkle 0.8s ease forwards;
}

.sparkles span:nth-child(1) { top: 0; left: 50%; animation-delay: 0.4s; }
.sparkles span:nth-child(2) { top: 50%; right: 0; animation-delay: 0.5s; }
.sparkles span:nth-child(3) { bottom: 0; left: 50%; animation-delay: 0.6s; }
.sparkles span:nth-child(4) { top: 50%; left: 0; animation-delay: 0.7s; }

@keyframes sparkle {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.membership-title {
    color: var(--layout-ink, #e5e7eb);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.membership-text {
    color: var(--layout-muted, #94a3b8);
    font-size: 0.95rem;
    max-width: 320px;
    margin: 0 auto 1.5rem;
}

.membership-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--layout-muted, #94a3b8);
    font-size: 0.8rem;
}

.feature-item i {
    width: 40px;
    height: 40px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--layout-brand, #22c55e);
}

.membership-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.membership-actions .btn {
    min-width: 120px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    border-radius: 8px;
}

.membership-actions .btn-primary {
    background: linear-gradient(135deg, var(--layout-brand, #22c55e), #059669);
    border: none;
}

.membership-actions .btn-primary:hover {
    background: linear-gradient(135deg, #16a34a, #047857);
}

.membership-actions .btn-outline-secondary {
    border-color: var(--layout-border, rgba(148, 163, 184, 0.3));
    color: var(--layout-muted, #94a3b8);
}

.membership-actions .btn-outline-secondary:hover {
    background: rgba(148, 163, 184, 0.1);
    color: var(--layout-ink, #e5e7eb);
}

/* Responsive */
@media (max-width: 992px) {
    .demo-page {
        padding: 1rem;
    }

    .demo-title {
        font-size: 1.5rem;
    }

    .final-result-value {
        font-size: 3rem;
    }
}

@media (max-width: 576px) {
    .calc-type-selector {
        flex-direction: column;
        gap: 0.5rem;
    }

    .membership-features {
        gap: 1rem;
    }

    .membership-actions {
        flex-direction: column;
    }

    .membership-actions .btn {
        width: 100%;
    }
}
