/* Pomodoro Timer Styles */

.pomodoro-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 20, 20, 0.98);
    color: #fff;
    overflow-y: auto;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

.pomodoro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #444;
}

.pomodoro-header h2 {
    margin: 0;
    font-size: 28px;
    color: #f48c06;
}

.close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #f44336;
}

.pomodoro-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Timer Settings */
.timer-settings {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin: 0 auto 30px;
    max-width: 400px;
}

.timer-settings label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #aaa;
}

.timer-display {
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
    color: #faa307;
}

#pomodoroSlider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
}

#pomodoroSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #faa307;
    cursor: pointer;
}

#pomodoroSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #faa307;
    cursor: pointer;
    border: none;
}

/* Pomodoro List */
.pomodoro-list h3 {
    text-align: center;
    color: #faa307;
    margin-bottom: 20px;
}

/* Cards Container - More specific to override experience.css */
.pomodoro-container .cards-container,
#pomodoroCards {
    display: block !important; /* Override grid from experience.css */
    margin-top: 20px;
    min-height: 100px; /* Ensure container has height */
}

/* Ensure domain grid is properly displayed */
.pomodoro-container .domain-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    justify-content: center !important;
    align-items: stretch !important;
}

/* Domain selection styles */
.domain-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
    align-items: stretch;
}

.domain-tile {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid;
    border-radius: 12px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1 1 200px; /* Grow, shrink, with 200px base */
    min-width: 200px;
}

.domain-tile:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.domain-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.domain-tile h4 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #fff;
}

.domain-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0 0 15px;
}

.domain-count {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
}

/* Back button */
.domain-back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.domain-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Pomodoro grid for domain view */
.pomodoro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

/* Domain grouping styles (legacy) */
.domain-header {
    margin-top: 25px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.domain-header h3 {
    margin: 0;
    font-size: 20px;
    color: #fff;
}

.domain-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.pomodoro-card {
    background: linear-gradient(135deg, rgba(250, 163, 7, 0.1), rgba(220, 47, 2, 0.1));
    border: 1px solid rgba(250, 163, 7, 0.2);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pomodoro-card:hover {
    transform: translateY(-2px);
    border-color: #faa307;
    box-shadow: 0 4px 20px rgba(250, 163, 7, 0.2);
}

.pomodoro-card h4 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #faa307;
}

.pomodoro-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 10px;
}

.skill-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Hidden state */
.pomodoro-container.hidden {
    display: none !important;
}

/* Pomodoro Screens */
.pomodoro-screen {
    transition: opacity 0.3s ease;
}

.pomodoro-screen.hidden {
    display: none;
}

.pomodoro-screen h3 {
    text-align: center;
    color: #f48c06;
    margin-bottom: 30px;
}

/* Skills List */
.pomodoro-skills-list {
    max-width: 600px;
    margin: 0 auto 30px;
}

.pomodoro-skill-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pomodoro-skill-item .skill-name {
    font-size: 16px;
    color: #fff;
    flex: 1;
}

.pomodoro-skill-item .skill-weight {
    background: #f48c06;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Timer Container */
.timer-container {
    text-align: center;
    margin: 40px 0;
}

.timer-image {
    width: 200px;
    height: 200px;
    display: block;
    margin: 0 auto 20px;
    filter: drop-shadow(0 0 20px rgba(250, 163, 7, 0.3));
}

.time-display {
    font-size: 48px;
    font-weight: 300;
    margin: 20px 0;
    font-variant-numeric: tabular-nums;
    color: #ffba08;
    text-shadow: 0 0 20px rgba(250, 163, 7, 0.5);
}

/* Timer Controls */
.timer-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Buttons */
.back-button, .start-button, .control-button, .cancel-button, .continue-button {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: 20px;
}

.start-button {
    background: #faa307;
    color: white;
    display: block;
    margin: 0 auto;
    width: 200px;
}

.control-button {
    background: #17a2b8;
    color: white;
}

.cancel-button {
    background: #dc3545;
    color: white;
}

.continue-button {
    background: #f48c06;
    color: white;
    display: block;
    margin: 20px auto;
}

.back-button:hover, .start-button:hover, .control-button:hover, 
.cancel-button:hover, .continue-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Completion Screen */
.completion-message {
    text-align: center;
    font-size: 18px;
    margin: 30px 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .pomodoro-container {
        padding: 10px;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    /* Force column layout on mobile */
    .pomodoro-container .domain-grid {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .pomodoro-container .domain-tile {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .timer-image {
        width: 150px;
        height: 150px;
    }
    
    .time-display {
        font-size: 36px;
    }
}

/* Desktop - ensure row layout */
@media (min-width: 769px) {
    .pomodoro-container .domain-grid {
        flex-direction: row !important;
        max-width: 1200px;
        margin: 20px auto;
    }

    .pomodoro-container .domain-tile {
        flex: 1 1 calc(25% - 15px) !important; /* 4 columns accounting for gap */
        max-width: calc(25% - 15px) !important; /* Allow tiles to use full width */
    }
}