/* Ported from index.html internal styles for consistency */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Override */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.header h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header .subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Navigation Override - Remove Fixed Position */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    position: static;
    /* Override styles.css fixed */
    transform: none;
    /* Override styles.css transform */
    background: transparent;
    /* Reset background */
    box-shadow: none;
    /* Reset shadow */
    border: none;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Custom styles for Duygu Analizi Page */

/* Layout Grid that replaces Grid System */
.analysis-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 30px;
    height: calc(100vh - 200px);
    /* Adjust based on header/footer */
    min-height: 600px;
}

@media (max-width: 1024px) {
    .analysis-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* Video Column Styles */
.video-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    /* Mirror effect */
}

.canvas-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    /* Mirror effect */
    pointer-events: none;
}

/* Overlays */
.overlay-center {
    position: absolute;
    inset: 0;
    /* top/right/bottom/left: 0 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(21, 30, 46, 0.9);
    z-index: 20;
    color: white;
    text-align: center;
}

.overlay-center.hidden {
    display: none;
}

.status-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #cbd5e1;
    pointer-events: none;
}

.status-badge.hidden {
    display: none;
}

/* Controls Panel */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

@media (min-width: 640px) {
    .controls-panel {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.control-text {
    font-size: 0.9em;
    color: #666;
}

.control-text strong {
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.control-buttons-group {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

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

.btn-stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-clear {
    background: #475569;
    color: white;
}

/* Right Column Styles */
.stats-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Result Cards */
.result-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.card-header-flex {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.emotion-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.emotion-icon {
    width: 50px;
    height: 50px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #667eea;
}

.emotion-info h2 {
    font-size: 1.25em;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.emotion-info p {
    font-size: 0.85em;
    color: #666;
}

/* Analysis Log / Chart Area */
.log-card {
    flex: 1;
    /* Take remaining height */
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.log-content {
    flex: 1;
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8f9fa;
    overflow: hidden;
}

/* Log List Styling */
.log-header-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    text-transform: uppercase;
    background: #fff;
}

.log-list {
    position: absolute;
    inset: 40px 0 0 0;
    /* Below header */
    overflow-y: auto;
    padding: 5px;
}

.log-item {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 6px;
    font-size: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

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

/* Download Section */
.download-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.download-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-download {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-download:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

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

/* Utility Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.hidden {
    display: none !important;
}