/* Modern Animation Panel - Neues Design für die Spielzugaufnahme */

/* Panel Container mit modernem Design */
.animation-panel {
    width: 84px; /* etwas breiter für runde Buttons */
    min-width: 84px;
    height: auto; 
    max-height: 936px;
    background: linear-gradient(145deg, #242e4c, #1a2035); /* Dunklere, professionelle Farbgebung */
    border-radius: 16px;
    padding: 15px 10px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow-y: auto;
    border: none; /* Kein Border für cleanen Look */
    flex-shrink: 0;
    position: relative;
}

/* Verbesserte Section-Headers */
.animation-panel .section-header {
    background: transparent;
    width: 100%;
    border-radius: 12px;
    padding: 4px 0 0 0;
    margin-bottom: 0;
    border: none;
}

.animation-panel .section-header h4 { display: none; }

.animation-panel .collapse-icon {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
}

/* Animation Sections */
.animation-panel .animation-section {
    width: 100%;
    padding: 6px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Section Titles mit modernem Look */
/* Titel/Labels werden nicht angezeigt */
.animation-panel .section-title { display: none !important; }

/* Moderne Buttons mit eleganten Hover-Effekten */
.animation-panel .btn-record,
.animation-panel .btn-stop,
.animation-panel .btn-capture,
.animation-panel .btn-play,
.animation-panel .btn-save,
.animation-panel .btn-clear {
    width: 56px !important;
    height: 56px !important;
    border: none !important;
    border-radius: 50% !important; /* Runde Buttons für moderneres Aussehen */
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Verbesserte Animation */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    margin: 6px 0 !important;
    background-size: 200% 200%;
    position: relative;
}

/* Gemeinsame Hover-Effekte */
.animation-panel button:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
}

.animation-panel button:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}

/* Individuelle Button-Stile */
.animation-panel .btn-record {
    background: linear-gradient(145deg, #ff3a5e, #e5294f);
    color: white;
}

.animation-panel .btn-record:hover:not(:disabled) {
    background: linear-gradient(145deg, #e5294f, #d42547);
    box-shadow: 0 8px 16px rgba(229, 41, 79, 0.4);
}

.animation-panel .btn-stop {
    background: linear-gradient(145deg, #4b5563, #374151);
    color: white;
}

.animation-panel .btn-stop:hover:not(:disabled) {
    background: linear-gradient(145deg, #374151, #1f2937);
    box-shadow: 0 8px 16px rgba(55, 65, 81, 0.4);
}

.animation-panel .btn-capture {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
}

.animation-panel .btn-capture:hover:not(:disabled) {
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.4);
}

.animation-panel .btn-play {
    background: linear-gradient(145deg, #10b981, #059669);
    color: white;
}

.animation-panel .btn-play:hover:not(:disabled) {
    background: linear-gradient(145deg, #059669, #047857);
    box-shadow: 0 8px 16px rgba(5, 150, 105, 0.4);
}

.animation-panel .btn-save {
    background: linear-gradient(145deg, #8b5cf6, #7c3aed);
    color: white;
}

.animation-panel .btn-save:hover:not(:disabled) {
    background: linear-gradient(145deg, #7c3aed, #6d28d9);
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.4);
}

.animation-panel .btn-clear {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    color: white;
}

.animation-panel .btn-clear:hover:not(:disabled) {
    background: linear-gradient(145deg, #d97706, #b45309);
    box-shadow: 0 8px 16px rgba(217, 119, 6, 0.4);
}

/* Disabled Button-Style */
.animation-panel button:disabled {
    background: #2e3a59;
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

/* Recording Controls Container */
.animation-panel #recordingControls {
    display: none;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Frame Counter mit modernem Design */
.animation-panel .frame-counter {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 8px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Leuchtender Effekt für den Frame Counter während der Aufnahme */
.animation-panel.recording .frame-counter {
    background: rgba(229, 41, 79, 0.2);
    box-shadow: 0 0 15px rgba(229, 41, 79, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(229, 41, 79, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(229, 41, 79, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 41, 79, 0); }
}

/* Timeline entfernt */
.animation-panel .timeline-container, .animation-panel .timeline { display: none !important; }

/* Frame Thumbnails mit modernem Look */
.animation-panel .frame-thumbnail {
    position: relative;
    width: 100%;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.animation-panel .frame-thumbnail:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.animation-panel .frame-thumbnail.selected {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.animation-panel .frame-number {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.animation-panel .frame-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.animation-panel .frame-thumbnail:hover .frame-delete {
    opacity: 1;
}

.animation-panel .frame-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Status-Indikator */
.animation-panel .status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
}

.animation-panel.recording .status-indicator {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    opacity: 1;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Anpassungen */
@media (max-width: 1024px) {
    .animation-panel {
        width: 78px;
        min-width: 78px;
        padding: 12px 8px;
    }
    
    .animation-panel .btn-record,
    .animation-panel .btn-stop,
    .animation-panel .btn-capture,
    .animation-panel .btn-play,
    .animation-panel .btn-save,
    .animation-panel .btn-clear {
        width: 52px;
        height: 52px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .animation-panel {
        width: 100%;
        min-width: 100%;
        flex-direction: row;
        height: 80px;
        padding: 10px;
        gap: 15px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .animation-panel .section-header {
        width: auto;
    }
    
    .animation-panel .section-title {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 10px;
        margin: 0;
    }
    
    .animation-panel .animation-section {
        width: auto;
        padding: 0;
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.07);
        padding-right: 15px;
        margin-right: 5px;
    }
    
    .animation-panel .animation-section:last-child {
        border-right: none;
    }
    
    .animation-panel .timeline-container {
        width: 200px;
    }
    
    .animation-panel #recordingControls {
        flex-direction: row;
        align-items: center;
    }
}