/* Countdown Maker Styles */

.countdown-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

.countdown-header {
    text-align: center;
    margin-bottom: 2rem;
}

.countdown-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.countdown-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Main Layout */
.countdown-main {
    display: grid;
    grid-template-columns: minmax(280px, 350px) 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Settings Panel */
.settings-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.settings-panel h3 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

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

.input-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.input-group input[type="text"],
.input-group input[type="datetime-local"] {
    width: 100%;
    padding: 0.875rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Theme Options */
.theme-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.theme-btn:hover {
    transform: scale(1.1);
}

.theme-btn.active {
    border-color: var(--primary);
}

.theme-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    opacity: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.theme-btn.active .theme-check {
    opacity: 1;
}

/* Checkbox Options */
.checkbox-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.9rem;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-custom svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    color: white;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom svg {
    opacity: 1;
}

/* Disabled checkbox state */
.checkbox-label.checkbox-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-label.checkbox-disabled .checkbox-custom {
    cursor: not-allowed;
}

/* Preview Panel */
.preview-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.preview-panel h3 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.countdown-preview {
    background: var(--dark-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.countdown-preview.theme-dark {
    background: #1a1b26;
}

.countdown-preview.theme-gradient {
    background: linear-gradient(135deg, #5865f2, #7c3aed);
}

.countdown-preview.theme-light {
    background: #f0f0f0;
}

.countdown-preview.theme-light .preview-title,
.countdown-preview.theme-light .time-value,
.countdown-preview.theme-light .time-label {
    color: #1a1b26;
}

.countdown-preview.theme-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.countdown-preview.theme-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.countdown-preview.theme-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.preview-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.preview-timer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    min-width: 90px;
    max-width: 90px;
}

.time-value {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    color: white;
    line-height: 1;
}

.time-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preview-end-message {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

/* Share Section */
.share-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.share-section h3 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.share-input-group {
    margin-bottom: 1rem;
}

.share-input-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.share-actions {
    margin-bottom: 1rem;
}

.create-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.create-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}

.create-link-btn svg {
    width: 20px;
    height: 20px;
}

.copy-input {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.copy-input input {
    flex: 1;
    padding: 0.875rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.copy-btn {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

/* Saved Section */
.saved-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.saved-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.saved-header h3 {
    color: var(--text-light);
    font-size: 1.1rem;
}

.saved-header-actions {
    display: flex;
    gap: 0.5rem;
}

.new-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-btn:hover {
    border-color: var(--success);
    color: var(--success);
}

.new-btn svg {
    width: 18px;
    height: 18px;
}

.shared-badge {
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.editing-badge {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    background: var(--primary);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.saved-item.editing {
    border: 1px solid var(--primary);
    background: rgba(88, 101, 242, 0.1);
}

.save-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.save-btn svg {
    width: 18px;
    height: 18px;
}

.saved-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.saved-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--dark-bg);
    border-radius: 10px;
}

.saved-item-info {
    flex: 1;
}

.saved-item-title {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.saved-item-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.saved-item-actions {
    display: flex;
    gap: 0.5rem;
}

.saved-item-actions button {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saved-item-actions button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.saved-item-actions .delete-btn:hover {
    border-color: var(--error);
    color: var(--error);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

/* Responsive */
@media (max-width: 768px) {
    .countdown-main {
        grid-template-columns: 1fr;
    }
}

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

    .countdown-header h1 {
        font-size: 2rem;
    }

    .time-value {
        font-size: 2rem;
    }

    .time-block {
        width: 70px;
        min-width: 70px;
        max-width: 70px;
    }

    .saved-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .saved-item-actions {
        width: 100%;
    }

    .saved-item-actions button {
        flex: 1;
    }

    .copy-input {
        flex-direction: column;
    }

    .copy-input input {
        width: 100%;
    }

    .copy-btn {
        width: 100%;
    }
}
