* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #2a2a2a;
    color: white;
    height: 100vh;
    overflow: hidden;
}

body.custom-background {
    background-color: var(--custom-bg-color) !important;
}


.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
}

/* Header */
.header {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

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

.logo-icon {
    width: 38.4px;
    height: 18px;
    color: inherit;
}

.logo-text {
    font-size: 18px;
    font-weight: 500;
}

.date {
    font-size: 16px;
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    height: 40px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease, transform 0.3s cubic-bezier(0.87, -0.45, 0.12, 1.51);
}

.about-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.about-text {
    font-size: 14px;
    font-weight: 500;
    color: white;
}

.settings-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    height: 40px;
    border: none;
    border-radius: 20px;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.3s cubic-bezier(0.87, -0.45, 0.12, 1.51);
}

.settings-button:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.settings-text {
    font-size: 14px;
    font-weight: 500;
    color: #2a2a2a;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 80px;
}

.task-description {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    color: white;
    background-color: transparent;
    border: 2px dashed rgba(255, 255, 255, 0);
    outline: none;
    font-family: inherit;
    width: 400px;
    margin: 0 auto;
    display: block;
    border-radius: 15px;
    padding: 0;
    transition: border-color 0.4s cubic-bezier(0.87, -0.45, 0.12, 1.51), padding 0.4s cubic-bezier(0.87, -0.45, 0.12, 1.51);
}

.task-description:hover,
.task-description:focus {
    border-color: var(--border-color, rgba(255, 255, 255, 0.5));
    padding: 20px;
}

.task-description::placeholder {
    color: var(--placeholder-color, rgba(255, 255, 255, 0.5));
    font-weight: 600;
}

.timer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.timer-input {
    font-size: 20vh;
    font-weight: bold;
    color: white;
    background-color: transparent;
    border: none;
    text-align: center;
    outline: none;
    width: 1000px;
    font-family: inherit;
    letter-spacing: -0.05em;
    border-radius: 15px;
    margin-top: 0px;
    transition: margin-top 0.3s ease, background-color 0.2s ease;
}

.timer-input:hover {
    background-color: var(--timer-hover-color, rgba(255, 255, 255, 0.03));
    margin-top: 10px;
}

.timer-input:focus {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-top: 10px;
}

.timer-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
}

.timer-hint {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-top: 15px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.timer-hint.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0px);
}

.enter-key {
    font-family: 'SUSE Mono', monospace;
    font-weight: 700;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Footer */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.play-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: #2a2a2a;
    width: 25vw;
    height: 60px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.87, -0.45, 0.12, 1.51);
    font-weight: bold;
}

.play-button:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.play-button:active {
    transform: scale(0.95);
}

.play-icon {
    font-size: 25px;
    margin-left: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .play-button {
        width: 95vw;
    }
    
    .task-description {
        font-size: 20px;
    }
    
    .timer-input {
        font-size: 10vh;
        width: fit-content;
    }
    
    .header {
        margin-bottom: 30px;
    }
    
    .main-content {
        gap: 20px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-overlay.show ~ .container {
    filter: blur(4px);
    transition: filter 0.3s ease;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.modal-title-section {
    flex: 1;
    margin-right: 40px;
}

.modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.05em;
    color: #333;
}

.modal-description {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
    color: #666;
    line-height: 1.4;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.close-button:hover {
    background-color: #f5f5f5;
}

.modal-body {
    padding: 24px;
}

.color-option {
    margin-bottom: 20px;
}

.color-option:last-child {
    margin-bottom: 0;
}

.color-option label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.05em;
    color: #333;
    margin-bottom: 8px;
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    background-color: #fff;
}

.color-picker {
    width: 32px;
    height: 32px;
    border: 0.2px solid #000;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: transform 0.2s ease;
}

.color-picker:hover {
    transform: scale(1.1);
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-code {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    letter-spacing: -0.05em;
    background: none;
    border: none;
    outline: none;
    padding: 0;
    width: 60px;
    text-align: center;
}

.font-picker-container {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    background-color: #fff;
}

.font-picker {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: none;
    border: none;
    outline: none;
    padding: 0;
    width: 100%;
    cursor: pointer;
}

/* Custom Font Dropdown */
.custom-font-dropdown {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
}

.font-dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.font-dropdown-selected:hover {
    background-color: #f8f9fa;
}

.font-preview {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.custom-font-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.font-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.custom-font-dropdown.open .font-dropdown-options {
    display: block;
}

.font-option {
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.font-option:last-child {
    border-bottom: none;
}

.font-option:hover {
    background-color: #f8f9fa;
}

.font-sample {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: block;
}

.gradient-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.gradient-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.gradient-toggle label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.05em;
    color: #333;
    margin: 0;
}

.toggle-button {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #ddd;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 0;
}

.toggle-button.active {
    background-color: #4CAF50;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-button.active .toggle-slider {
    transform: translateX(20px);
}

.gradient-options {
    display: none;
    transition: opacity 0.3s ease;
}

.gradient-options.show {
    display: block;
}

/* Custom letter spacing for different fonts */
.timer-input.font-bebas-neue {
    letter-spacing: 0em;
}

/* Rise Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -5;
    overflow: hidden;
    opacity: 0.7;
}

.rise-particle {
    position: absolute;
    width: 3.2px;
    height: 3.2px;
    background-color: var(--text-color, #ffffff);
    border-radius: 50%;
    opacity: 0.6;
    animation: riseUp linear infinite;
    box-shadow: 0 0 6px var(--text-color, #ffffff);
}

.rise-trail {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, var(--text-color, #ffffff) 0%, transparent 100%);
    opacity: 0.8;
    border-radius: 1px;
    animation: riseUp linear infinite;
}

@keyframes riseUp {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-10vh) translateX(0);
        opacity: 0;
    }
}

.dust-particle {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    opacity: 0.8;
    animation: dustFloat linear infinite;
}

@keyframes dustFloat {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    10% {
        opacity: 0.8;
        transform: scale(1);
    }
    90% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Animated Circles */
.circle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -10;
}

.circle-1 {
    width: 2540px;
    height: 1200px;
    background: radial-gradient(circle, var(--circle-1-color, rgba(255, 255, 255, 0.8)) 0%, var(--circle-1-color-fade, rgba(255, 255, 255, 0.8)) 100%);
    filter: blur(200px);
    bottom: -700px;
    left: -1120px;
    opacity: 0.9;
    animation: moveCircle1 30s ease-in-out infinite;
}

.circle-2 {
    width: 2000px;
    height: 1600px;
    background: radial-gradient(circle, var(--circle-2-color, rgba(255, 255, 255, 0.8)) 0%, var(--circle-2-color-fade, rgba(255, 255, 255, 0.8)) 100%);
    filter: blur(100px);
    bottom: -1200px;
    right: -800px;
    opacity: 0.7;
    animation: moveCircle2 36s ease-in-out infinite;
}

@keyframes moveCircle1 {
    0% {
        left: -1120px;
    }
    50% {
        left: calc(100vw - 1120px);
    }
    100% {
        left: -1120px;
    }
}

@keyframes moveCircle2 {
    0% {
        right: -800px;
    }
    50% {
        right: calc(100vw - 800px);
    }
    100% {
        right: -800px;
    }
}

/* Pulse animation for stop button */
@keyframes pulse {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
    }
}
