/* Zen Mode Button */
.btn-icon.zen {
    position: relative;
}

.btn-icon.zen.active {
    color: var(--gold);
    border-color: rgba(201, 169, 98, 0.4);
    background: rgba(201, 169, 98, 0.1);
}

/* Zen Mode Screen */
.zen-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-deep);
    overflow: hidden;
    /* Prevent text selection on zen screen */
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.zen-screen.active {
    display: flex;
}

.zen-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(201, 169, 98, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(201, 169, 98, 0.05) 0%, transparent 50%),
        var(--bg-deep);
    animation: zenBreathe 8s ease-in-out infinite;
}

@keyframes zenBreathe {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.zen-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 320px;
}

.zen-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 169, 98, 0.05);
    animation: zenIconPulse 4s ease-in-out infinite;
}

@keyframes zenIconPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(201, 169, 98, 0.2);
    }
    50% {
        box-shadow: 0 0 40px 10px rgba(201, 169, 98, 0.1);
    }
}

.zen-icon svg {
    width: 36px;
    height: 36px;
    color: var(--gold);
    stroke-width: 1.5;
}

.zen-message {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
    color: var(--champagne);
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

.zen-submessage {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 48px;
    line-height: 1.5;
}

.zen-timer {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.02em;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
}

.zen-timer-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 60px;
}

.zen-unlock-container {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
}

.zen-unlock-btn {
    position: relative;
    width: 200px;
    height: 54px;
    border: 1px solid rgba(201, 169, 98, 0.25);
    border-radius: 27px;
    background: rgba(20, 20, 22, 0.9);
    color: rgba(201, 169, 98, 0.7);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 0 rgba(201, 169, 98, 0);
}

.zen-unlock-btn:active {
    transform: scale(0.97);
}

.zen-unlock-btn.holding {
    border-color: rgba(201, 169, 98, 0.6);
    box-shadow:
        0 0 20px rgba(201, 169, 98, 0.15),
        0 0 40px rgba(201, 169, 98, 0.08),
        inset 0 0 20px rgba(201, 169, 98, 0.05);
    animation: zenPulse 2s ease-in-out infinite;
}

@keyframes zenPulse {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(201, 169, 98, 0.15),
            0 0 40px rgba(201, 169, 98, 0.08),
            inset 0 0 20px rgba(201, 169, 98, 0.05);
    }
    50% {
        box-shadow:
            0 0 25px rgba(201, 169, 98, 0.25),
            0 0 50px rgba(201, 169, 98, 0.12),
            inset 0 0 25px rgba(201, 169, 98, 0.08);
    }
}

.zen-unlock-btn.holding .zen-unlock-text {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(201, 169, 98, 0.3);
}

.zen-unlock-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(
        90deg,
        rgba(201, 169, 98, 0.1) 0%,
        rgba(201, 169, 98, 0.2) 50%,
        rgba(201, 169, 98, 0.3) 100%
    );
    transition: width 0.1s linear;
    border-radius: 27px;
}

.zen-unlock-btn.holding .zen-unlock-progress {
    background: linear-gradient(
        90deg,
        rgba(201, 169, 98, 0.15) 0%,
        rgba(201, 169, 98, 0.25) 40%,
        rgba(201, 169, 98, 0.35) 100%
    );
}

.zen-unlock-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    animation: zenShimmer 1.5s ease-in-out infinite;
    border-radius: 27px;
}

@keyframes zenShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(200%);
    }
}

.zen-unlock-text {
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Zen Mode Modal */
.zen-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1001;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-bottom));
}

.zen-modal.active {
    display: flex;
}

.zen-modal-content {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 24px;
    animation: slideUp 0.3s ease;
}

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

.zen-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.zen-modal-icon {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 169, 98, 0.08);
}

.zen-modal-icon svg {
    width: 22px;
    height: 22px;
    color: var(--gold);
    stroke-width: 1.5;
}

.zen-modal-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    color: var(--champagne);
}

.zen-modal-subtitle {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.zen-duration-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.zen-duration-btn {
    padding: 18px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: var(--bg-card-elevated);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.zen-duration-btn:active {
    transform: scale(0.97);
    background: rgba(201, 169, 98, 0.1);
    border-color: rgba(201, 169, 98, 0.3);
}

.zen-duration-value {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    color: var(--champagne);
    margin-bottom: 4px;
}

.zen-duration-label {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-tertiary);
    letter-spacing: 0.03em;
}

.zen-cancel-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-tertiary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zen-cancel-btn:active {
    background: rgba(255, 255, 255, 0.03);
}

.zen-unlock-setting {
    margin-bottom: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

.zen-unlock-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.zen-unlock-header svg {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
    stroke-width: 1.5;
}

.zen-unlock-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.zen-unlock-options {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.zen-unlock-option {
    min-width: 52px;
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.zen-unlock-option.selected {
    border-color: var(--gold);
    background: rgba(201, 169, 98, 0.12);
    color: var(--gold);
    font-weight: 500;
}

.zen-unlock-option:active {
    transform: scale(0.94);
}

.zen-unlock-custom {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    background: transparent;
    transition: all 0.2s ease;
}

.zen-unlock-custom.selected {
    border-color: var(--gold);
    background: rgba(201, 169, 98, 0.12);
}

.zen-unlock-custom input {
    width: 36px;
    padding: 4px 0;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    text-align: center;
    outline: none;
    -moz-appearance: textfield;
}

.zen-unlock-custom.selected input {
    color: var(--gold);
    font-weight: 500;
}

.zen-unlock-custom input::-webkit-outer-spin-button,
.zen-unlock-custom input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.zen-unlock-custom span {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-tertiary);
}

.zen-unlock-custom.selected span {
    color: var(--gold);
}
