/**
 * D&D AI RPG - Day/Night Cycle System Styles
 * Time display, notifications, and ambient lighting effects
 */

/* Time Display - Fixed in top corner */
.time-display {
    position: fixed;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    border: 2px solid #f39c12;
    border-radius: 10px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-display:hover {
    transform: scale(1.05);
    border-color: #f1c40f;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
}

.time-icon {
    font-size: 24px;
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.time-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.time-clock {
    font-size: 14px;
    font-weight: bold;
    color: #f1c40f;
}

.time-date {
    font-size: 11px;
    color: #95a5a6;
}

/* Time Notification */
.time-notification {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 33, 62, 0.98) 100%);
    border: 2px solid #f39c12;
    border-radius: 15px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 5000;
    opacity: 0;
    transition: all 0.5s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 300px;
}

.time-notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.time-notification-icon {
    font-size: 40px;
}

.time-notification-text {
    flex: 1;
}

.time-notification-title {
    font-size: 18px;
    font-weight: bold;
    color: #f1c40f;
    margin-bottom: 4px;
}

.time-notification-desc {
    font-size: 13px;
    color: #bdc3c7;
    font-style: italic;
}

/* Time Settings Panel */
.time-settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3500;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.time-panel-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #f39c12;
    border-radius: 15px;
    max-width: 500px;
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.time-panel-header {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-panel-header h2 {
    margin: 0;
    color: #1a1a2e;
    font-size: 18px;
}

.time-panel-header .close-btn {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #1a1a2e;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.time-panel-header .close-btn:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: rotate(90deg);
}

.time-panel-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(85vh - 60px);
}

/* Current Time Display */
.time-current {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 15px;
}

.time-big-icon {
    font-size: 60px;
}

.time-current-info {
    flex: 1;
}

.time-current-time {
    font-size: 32px;
    font-weight: bold;
    color: #f1c40f;
}

.time-current-period {
    font-size: 18px;
    color: #ecf0f1;
    margin-top: 5px;
}

.time-current-date {
    font-size: 14px;
    color: #95a5a6;
    margin-top: 3px;
}

.time-ambiance {
    font-style: italic;
    color: #bdc3c7;
    text-align: center;
    padding: 10px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Time Controls */
.time-controls,
.time-wait,
.time-modifiers {
    margin-bottom: 20px;
}

.time-controls h3,
.time-wait h3,
.time-modifiers h3 {
    color: #f39c12;
    font-size: 14px;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(243, 156, 18, 0.3);
}

.time-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.time-btn {
    background: rgba(243, 156, 18, 0.15);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: #ecf0f1;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}

.time-btn:hover {
    background: rgba(243, 156, 18, 0.3);
    border-color: #f39c12;
    transform: translateY(-2px);
}

/* Time Modifiers */
.time-modifier-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-modifier {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 13px;
}

.time-modifier.positive .modifier-value {
    color: #2ecc71;
}

.time-modifier.negative .modifier-value {
    color: #e74c3c;
}

.modifier-label {
    color: #bdc3c7;
}

.modifier-value {
    font-weight: bold;
}

.no-modifiers {
    color: #7f8c8d;
    text-align: center;
    font-style: italic;
    padding: 10px;
}

/* Ambient Lighting Effects */
.scene-panel {
    position: relative;
}

.scene-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--time-overlay, transparent);
    pointer-events: none;
    transition: background 2s ease;
    border-radius: inherit;
}

/* Time-based body styling */
body.time-dawn {
    --ambient-color: rgba(255, 200, 150, 0.05);
}

body.time-morning {
    --ambient-color: rgba(255, 255, 255, 0.02);
}

body.time-afternoon {
    --ambient-color: rgba(255, 255, 200, 0.03);
}

body.time-evening {
    --ambient-color: rgba(255, 150, 100, 0.05);
}

body.time-dusk {
    --ambient-color: rgba(100, 100, 180, 0.08);
}

body.time-night {
    --ambient-color: rgba(20, 20, 60, 0.1);
}

/* Night mode special effects */
body.time-night .scene-image {
    filter: brightness(0.7) contrast(1.1);
}

body.time-dusk .scene-image {
    filter: brightness(0.85) sepia(0.1);
}

body.time-dawn .scene-image {
    filter: brightness(1.05) sepia(0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .time-display {
        top: 5px;
        right: 5px;
        padding: 6px 10px;
    }
    
    .time-icon {
        font-size: 20px;
    }
    
    .time-clock {
        font-size: 12px;
    }
    
    .time-date {
        font-size: 10px;
    }
    
    .time-panel-content {
        max-width: 98%;
    }
    
    .time-buttons {
        grid-template-columns: 1fr;
    }
    
    .time-big-icon {
        font-size: 40px;
    }
    
    .time-current-time {
        font-size: 24px;
    }
}
