/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
}

:root {
    /* Monochrome grayscale aesthetic */
    --bg-color: #f3f4f6;
    --accent-coral: #1f1f1f;
    --accent-teal: #1f1f1f;
    --accent-navy: #1f1f1f;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --card-bg: #ffffff;
    --card-shadow: rgba(0,0,0,0.05);
    --border-color: #d1d5db;
    --success-color: #1f1f1f;
    --danger-color: #1f1f1f;
    --warning-color: #1f1f1f;
    --border-radius: 8px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-color);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
}



.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
    width: 100%;
}

/* Header */
.header {
    margin-bottom: 32px;
    position: relative;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.header-content {
    flex: 1;
    text-align: center;
    min-width: 0; /* Prevent flex item from growing beyond container */
}

.header-support {
    flex-shrink: 0;
    margin-top: 8px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Make BMC button smaller */
.header-support #bmc-wbtn,
.header-support .bmc-btn,
.header-support [id*="bmc"],
.header-support a[href*="buymeacoffee"],
.header-support iframe,
.header-support div[id*="bmc"],
.header-support * {
    transform: scale(0.8) !important;
    transform-origin: top right !important;
}

/* Alternative approach - target the BMC widget container */
.header-support {
    transform: scale(0.8) !important;
    transform-origin: top right !important;
}

/* Adjust BMC text and logo sizes specifically */
.header-support span,
.header-support img,
.header-support svg,
.header-support text,
.header-support *[class*="text"],
.header-support *[class*="logo"] {
    transform: scale(0.96) !important;
    transform-origin: center !important;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.logo-image {
    height: 160px;
    width: auto;
    max-width: 600px;
    object-fit: contain;
}

.header p {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}



/* Main content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Timer Section */
.timer-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: 0 2px 8px var(--card-shadow);
    text-align: center;
    border: 1px solid var(--border-color);
}

.timer-display {
    margin-bottom: 24px;
}

.timer-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.time-display {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background-color: #1f1f1f;
    border: 2px solid #444444;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto 24px auto;
    font-family: 'DS-Digital', 'Orbitron', monospace;
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.1em;
}

.time-display::before {
    content: 'M S';
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 400;
    color: #ffffffaa;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}

.time-display::after {
    content: '';
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff44;
}

.timer-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.tooltip-icon {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: help;
    transition: color 0.2s ease;
}

.tooltip-icon:hover {
    color: var(--accent-coral);
}

.timer-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 16px 32px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 100px;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: #1f1f1f;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #1f1f1f;
    color: #ffffff;
}

.btn-secondary {
    background: #1f1f1f;
    color: #ffffff;
}

.btn-success {
    background: #1f1f1f;
    color: #ffffff;
}

.btn-danger {
    background: #1f1f1f;
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: #333333;
    border: 2px solid #333333;
}

.btn-outline:hover {
    background: #333333;
    color: #ffffff;
}

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

/* Task Section */
.task-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 2px 8px var(--card-shadow);
    border: 1px solid var(--border-color);
}

.task-input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.task-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.task-input:focus {
    outline: none;
    border-color: #1f1f1f;
    box-shadow: 0 0 0 3px rgba(31, 31, 31, 0.1);
}

.task-list-container h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: #FAFAFA;
    border-radius: var(--border-radius);
    padding: 16px;
    border-left: 3px solid #1f1f1f;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid var(--border-color);
}

.task-item:hover {
    background: #F5F5F5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
}

.task-item.active {
    border-left-color: #1f1f1f;
    background: #f3f4f6;
}

.task-item.clickedOn {
    border: 3px solid #1f1f1f;
    box-shadow: 0 4px 12px rgba(31, 31, 31, 0.15);
}

.task-info {
    flex: 1;
}

.task-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.edit-task-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.7rem;
    margin-left: 4px;
    vertical-align: middle;
}

.edit-task-btn:hover {
    background: rgba(242, 130, 87, 0.1);
    color: var(--accent-coral);
}

.edit-task-btn:active {
    transform: scale(0.95);
}

.task-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.task-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.task-actions .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-width: auto;
}

.export-section {
    margin-top: 24px;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    text-align: center;
}

.export-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.5;
    font-weight: 400;
}





/* History Section */
.history-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 2px 8px var(--card-shadow);
    border: 1px solid var(--border-color);
}

.history-section h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.history-list {
    margin-bottom: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: #FAFAFA;
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 8px;
    border-left: 3px solid #1f1f1f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid var(--border-color);
}

.history-info {
    flex: 1;
}

.history-task {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.history-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.history-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.history-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .header-support {
        margin-top: 0;
    }
    

    
    .header h1 {
        font-size: 2rem;
    }
    
    .time-display {
        font-size: 2.5rem;
    }
    
    .timer-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .task-input-container {
        flex-direction: column;
    }
    
    .task-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .task-actions {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 1.75rem;
    }
    
    .time-display {
        font-size: 2rem;
    }
    
    .timer-section,
    .task-section,
    .history-section {
        padding: 16px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Scrollbar styling */
.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Animation for task completion */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-item,
.history-item {
    animation: fadeIn 0.3s ease-out;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Theme Classes - Keeping for compatibility but using new design system */
body.theme-beige {
    --bg-color: #FFF5EC;
}

body.theme-black {
    --bg-color: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --card-bg: #2d2d2d;
    --border-color: #404040;
}

body.theme-blue {
    --bg-color: #667eea;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
} 