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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Set Timer View */
.set-view h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
    text-align: center;
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    font-size: 1.5rem;
    border: 2px solid currentColor;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    transform: scale(1.02);
}

.design-options {
    margin-bottom: 2rem;
}

.design-options label {
    display: block;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.design-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.design-option {
    padding: 1.5rem 1rem;
    border: 2px solid currentColor;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.design-option:hover {
    transform: translateY(-3px);
}

.design-option.selected {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px currentColor;
}

.btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.3rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: inherit;
    background: currentColor;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

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

/* Show Timer View */
.show-view {
    text-align: center;
}

.timer-display {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-line;
}

.timer-status {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-weight: 500;
}

.timer-status.expired {
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    font-weight: 700;
    opacity: 1;
}

.timer-end-date {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    opacity: 0.7;
    margin-top: 1rem;
    white-space: pre-line;
}

.copy-timer-link,
.create-timer-link,
.download-script-link {
    display: block;
    margin-top: 2rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
    opacity: 0.7;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.download-script-link {
    margin-top: 1.5rem;
}

.download-script-link u {
    text-decoration: underline;
}

.copy-timer-link {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.copy-timer-link:hover,
.create-timer-link:hover,
.download-script-link:hover {
    opacity: 1;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

/* About View */
.about-view {
    text-align: center;
}

.about-view h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
}

.about-view p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    margin-top: 3rem;
    text-align: center;
}

.footer-link {
    display: block;
    margin-bottom: 0.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
    opacity: 0.7;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 1;
}

.footer-text {
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    opacity: 0.5;
    margin-top: 0.5rem;
}

/* Design: Classic Minimal */
body.design-classic {
    background: #ffffff;
    color: #1a1a1a;
}
.design-classic .btn {
    background: #1a1a1a;
    color: #ffffff;
}
.design-classic .design-option.selected {
    background: #1a1a1a;
    color: #ffffff;
}
.design-classic .timer-status.expired {
    color: #c41e3a;
}
.design-classic .toast {
    background: #1a1a1a;
    color: #ffffff;
}

/* Design: Neon Cyberpunk */
body.design-neon {
    background: #0a0e27;
    color: #00ff88;
}
.design-neon .timer-display {
    text-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88;
}
.design-neon .btn {
    background: #00ff88;
    color: #0a0e27;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}
.design-neon .design-option.selected {
    background: #00ff88;
    color: #0a0e27;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}
.design-neon input {
    border-color: #00ff88;
}
.design-neon .timer-status.expired {
    color: #ff0055;
    text-shadow: 0 0 15px #ff0055;
}
.design-neon .toast {
    background: rgba(0, 255, 136, 0.95);
    color: #0a0e27;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.6), 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Design: Gradient Modern */
body.design-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}
.design-gradient .container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.design-gradient .btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}
.design-gradient .design-option.selected {
    background: rgba(255, 255, 255, 0.3);
}
.design-gradient .timer-status.expired {
    color: #ff4757;
}
.design-gradient .toast {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* Design: Sepia Vintage */
body.design-sepia {
    background: linear-gradient(135deg, #f4e8d8 0%, #e8d5c4 50%, #d9c4b0 100%);
    color: #5c4033;
}
.design-sepia .container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(92, 64, 51, 0.15);
}
.design-sepia .timer-display {
    color: #3e2723;
    text-shadow: 0 1px 3px rgba(92, 64, 51, 0.2);
}
.design-sepia .btn {
    background: #8b6f47;
    color: #f4e8d8;
}
.design-sepia .design-option.selected {
    background: #8b6f47;
    color: #f4e8d8;
}
.design-sepia input {
    border-color: #8b6f47;
}
.design-sepia .timer-status.expired {
    color: #a0522d;
}
.design-sepia .toast {
    background: rgba(139, 111, 71, 0.95);
    color: #f4e8d8;
    box-shadow: 0 4px 20px rgba(92, 64, 51, 0.3);
}

/* Design: Nature Organic */
body.design-nature {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #5d4037;
}
.design-nature .container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.design-nature .timer-display {
    color: #d84315;
}
.design-nature .btn {
    background: #d84315;
    color: #ffffff;
}
.design-nature .design-option.selected {
    background: #d84315;
    color: #ffffff;
}
.design-nature .timer-status.expired {
    color: #8b0000;
}
.design-nature .toast {
    background: rgba(216, 67, 21, 0.95);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(216, 67, 21, 0.4);
}

/* Design: Dark Classic */
body.design-dark {
    background: #000000;
    color: #ffffff;
}
.design-dark .btn {
    background: #ffffff;
    color: #000000;
}
.design-dark .design-option.selected {
    background: #ffffff;
    color: #000000;
}
.design-dark .timer-status.expired {
    color: #c41e3a;
}
.design-dark .toast {
    background: #ffffff;
    color: #000000;
}

/* Design: Ocean Blue */
body.design-ocean {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    color: #00d4ff;
}
.design-ocean .container {
    background: rgba(0, 212, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2);
}
.design-ocean .timer-display {
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}
.design-ocean .btn {
    background: #00d4ff;
    color: #0f2027;
}
.design-ocean .design-option.selected {
    background: #00d4ff;
    color: #0f2027;
}
.design-ocean .timer-status.expired {
    color: #ff6b6b;
}
.design-ocean .toast {
    background: rgba(0, 212, 255, 0.95);
    color: #0f2027;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Design: Sunset Fire */
body.design-sunset {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #ff9ff3 100%);
    color: #2d0a3f;
}
.design-sunset .container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.design-sunset .timer-display {
    color: #7e1d5e;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}
.design-sunset .btn {
    background: #7e1d5e;
    color: #ffffff;
}
.design-sunset .design-option.selected {
    background: #7e1d5e;
    color: #ffffff;
}
.design-sunset .timer-status.expired {
    color: #d32f2f;
}
.design-sunset .toast {
    background: rgba(126, 29, 94, 0.95);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(126, 29, 94, 0.5);
}

/* Design: Matrix Code */
body.design-matrix {
    background: #0d0d0d;
    color: #00ff41;
    font-family: 'Courier New', monospace;
}
.design-matrix .timer-display {
    text-shadow: 0 0 15px #00ff41, 0 0 30px #00ff41;
    letter-spacing: 0.05em;
    animation: matrix-flicker 3s infinite;
}
@keyframes matrix-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}
.design-matrix .btn {
    background: #00ff41;
    color: #0d0d0d;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}
.design-matrix .design-option.selected {
    background: #00ff41;
    color: #0d0d0d;
}
.design-matrix input {
    border-color: #00ff41;
    font-family: 'Courier New', monospace;
}
.design-matrix .timer-status.expired {
    color: #ff0000;
    text-shadow: 0 0 15px #ff0000;
}
.design-matrix .toast {
    background: rgba(0, 255, 65, 0.95);
    color: #0d0d0d;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.6), 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Design: Ice Arctic */
body.design-ice {
    background: linear-gradient(135deg, #e0f7ff 0%, #b3e5fc 50%, #81d4fa 100%);
    color: #01579b;
}
.design-ice .container {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(1, 87, 155, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
}
.design-ice .timer-display {
    color: #0277bd;
}
.design-ice .btn {
    background: #0277bd;
    color: #ffffff;
}
.design-ice .design-option.selected {
    background: #0277bd;
    color: #ffffff;
}
.design-ice .timer-status.expired {
    color: #c62828;
}
.design-ice .toast {
    background: rgba(2, 119, 189, 0.95);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(2, 119, 189, 0.4);
}

/* Design: Christmas */
body.design-xmas {
    background: linear-gradient(135deg, #165a4c 0%, #1e8767 50%, #b91d1d 100%);
    color: #ffffff;
}
.design-xmas .container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.design-xmas .timer-display {
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}
.design-xmas .btn {
    background: #ffd700;
    color: #165a4c;
    font-weight: 700;
}
.design-xmas .design-option.selected {
    background: #ffd700;
    color: #165a4c;
}
.design-xmas .timer-status.expired {
    color: #ff1744;
}
.design-xmas .toast {
    background: rgba(255, 215, 0, 0.95);
    color: #165a4c;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Design: Space Galaxy */
body.design-space {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #b19cd9;
}
.design-space .container {
    background: rgba(177, 156, 217, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(177, 156, 217, 0.2);
}
.design-space .timer-display {
    color: #e0bbe4;
    text-shadow: 0 0 15px rgba(224, 187, 228, 0.5);
}
.design-space .btn {
    background: #b19cd9;
    color: #0f0c29;
}
.design-space .design-option.selected {
    background: #b19cd9;
    color: #0f0c29;
}
.design-space .timer-status.expired {
    color: #ff5370;
}
.design-space .toast {
    background: rgba(177, 156, 217, 0.95);
    color: #0f0c29;
    box-shadow: 0 0 20px rgba(177, 156, 217, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .design-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .design-option {
        padding: 0.8rem 0.4rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .design-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }

    .design-option {
        padding: 0.7rem 0.3rem;
        font-size: 0.75rem;
    }
}
