/* 04-widgets.css · Couture OS UI 组件 */

/* ══════════════════════════════════════
   Editorial 日期组件
══════════════════════════════════════ */
.widget-editorial {
    position: relative; z-index: 10;
    margin: 40px 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--subtle-line);
    display: flex; flex-direction: column; gap: 5px;
}

.date-watermark-signature {
    position: absolute; top: -20px; left: -5px;
    font-family: 'Great Vibes', cursive;
    font-size: 95px; color: rgba(21,21,23,0.025);
    z-index: 0; pointer-events: none;
    transform: rotate(-5deg); white-space: nowrap;
}

.widget-date,
.widget-sub { position: relative; z-index: 1; }

.widget-date {
    font-family: 'Playfair Display', serif;
    font-size: 54px; font-weight: 700;
    line-height: 0.9; color: var(--ink-black);
    letter-spacing: -1px;
}

.widget-date span {
    font-style: italic;
    background: linear-gradient(to top, #000000 5%, var(--accent-white) 75%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.5px var(--ink-black);
}

.widget-sub {
    font-size: 10px; text-transform: uppercase; letter-spacing: 4px;
    color: var(--ink-black);
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 15px;
}

.barcode {
    width: 50px; height: 10px;
    background: repeating-linear-gradient(
        to right,
        var(--ink-black), var(--ink-black) 1px,
        transparent 1px, transparent 3px,
        var(--ink-black) 3px, var(--ink-black) 5px,
        transparent 5px, transparent 7px
    );
    opacity: 0.8;
}

.signature-break {
    position: absolute; bottom: -30px; right: -20px;
    font-family: 'Great Vibes', cursive;
    font-size: 44px; transform: rotate(-8deg);
    z-index: 20; pointer-events: none; padding: 15px 30px;
    -webkit-mask-image: radial-gradient(ellipse 65% 50% at center, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 100%);
    mask-image:         radial-gradient(ellipse 65% 50% at center, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 100%);
    background: linear-gradient(to top, #8E8E93 0%, #1C1C1E 60%, #000000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.5px rgba(255,255,255,0.8);
}

/* ══════════════════════════════════════
   门票 Music Card
══════════════════════════════════════ */
.ticket-wrapper {
    position: relative; z-index: 10;
    margin: 25px 25px 0;
    filter:
        drop-shadow(0 20px 30px rgba(0,0,0,0.15))
        drop-shadow(0 8px 12px rgba(0,0,0,0.1))
        drop-shadow(0 2px 3px rgba(0,0,0,0.05));
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.2,0.8,0.2,1);
}
.ticket-wrapper:active { transform: scale(0.96); }

.ticket-body {
    background: #141416;
    border-radius: 12px;
    display: flex;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.15),
        inset 0 2px 4px rgba(255,255,255,0.05);
    -webkit-mask-image:
        radial-gradient(circle at 74% 0px,   transparent 12px, black 12.5px),
        radial-gradient(circle at 74% 100%,  transparent 12px, black 12.5px);
    -webkit-mask-size:     100% 51%, 100% 51%;
    -webkit-mask-position: top left, bottom left;
    -webkit-mask-repeat:   no-repeat;
}

.ticket-accent-bar {
    position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
    background-color: #FFFFFF;
    box-shadow: inset -1px 0 3px rgba(0,0,0,0.6);
}

.ticket-tear-line {
    position: absolute; top: 18px; bottom: 18px; left: 74%; width: 2px;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent, transparent 5px,
        rgba(255,255,255,0.4) 5px, rgba(255,255,255,0.4) 9px
    );
    border-right: 1px solid rgba(0,0,0,0.8);
    transform: translateX(-50%);
    z-index: 5;
}

.ticket-left {
    position: relative;
    flex: 0 0 74%;
    background: linear-gradient(135deg, #18181A 0%, #0D0D0F 100%);
    padding: 24px 20px 24px 32px;
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden;
}

.ticket-left::before {
    content: ''; position: absolute; top: 0; left: 0; width: 180px; height: 180px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='%23FFFFFF' stroke-opacity='0.1' stroke-width='1.2' fill='none'%3E%3Ccircle cx='0' cy='0' r='40' fill='%23FFFFFF' fill-opacity='0.03'/%3E%3Ccircle cx='0' cy='0' r='75'/%3E%3Ccircle cx='0' cy='0' r='115' stroke-dasharray='3 6'/%3E%3Cline x1='0' y1='40' x2='0' y2='150'/%3E%3Cline x1='15.3' y1='37' x2='57.4' y2='138.5'/%3E%3Cline x1='28.3' y1='28.3' x2='106' y2='106'/%3E%3Cline x1='37' y1='15.3' x2='138.5' y2='57.4'/%3E%3Cline x1='40' y1='0' x2='150' y2='0'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: top left;
    pointer-events: none; z-index: 0;
}

.t-header, .t-title, .t-artist, .t-progress-wrapper { position: relative; z-index: 1; }

.t-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 12px;
}

.t-badge {
    font-size: 7.5px; font-weight: 900;
    background: #FFFFFF; color: #0A0A0C;
    padding: 3px 6px; border-radius: 2px;
    letter-spacing: 2px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.t-id {
    font-size: 9px; font-family: monospace;
    color: #8E8E93; letter-spacing: 1px; font-weight: 700;
}

.t-title {
    font-family: 'Playfair Display', serif;
    font-size: 21px; font-weight: 900; font-style: italic;
    color: #FFFFFF; line-height: 1.1; margin-bottom: 4px;
}

.t-artist {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; color: #8E8E93;
}

.t-progress-wrapper {
    display: flex; align-items: center; gap: 10px; margin-top: 15px;
}

.t-time {
    font-size: 9px; font-weight: 700;
    font-variant-numeric: tabular-nums; color: #FFFFFF;
}

.t-bar {
    flex: 1; height: 2px;
    background: rgba(255,255,255,0.15);
    position: relative; border-radius: 1px;
}

.t-bar-fill {
    position: absolute; top: 0; left: 0;
    height: 100%; width: 38%;
    background: #FFFFFF; border-radius: 1px;
}

.t-bar-dot {
    position: absolute; top: -2px; left: 38%;
    width: 6px; height: 6px;
    background: #FFFFFF; border-radius: 50%;
    box-shadow: 0 0 0 2px #0A0A0C, 0 2px 4px rgba(0,0,0,0.5);
}

.ticket-right {
    position: relative;
    flex: 0 0 26%;
    background: linear-gradient(135deg, #121214 0%, #0A0A0B 100%);
    display: flex; justify-content: center; align-items: center;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border: 1px solid rgba(255,255,255,0.35);
    border-left: none;
    box-shadow: inset 2px 0 8px rgba(0,0,0,0.6);
}

.ticket-right::before {
    content: '';
    position: absolute; top: 10px; bottom: 10px; left: 8px; right: 8px;
    border-top:    1px solid rgba(255,255,255,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.25);
    border-right:  1px solid rgba(255,255,255,0.1);
    border-radius: 4px; pointer-events: none;
}

/* ── 黑胶唱片 ── */
.t-vinyl {
    width: 58px; height: 58px; border-radius: 50%;
    background: repeating-radial-gradient(#111 0px, #2a2a2a 1px, #000 2px);
    border: 2px solid #FFFFFF;
    box-shadow: 0 8px 16px rgba(0,0,0,0.8), inset 0 0 2px rgba(0,0,0,1);
    display: flex; justify-content: center; align-items: center;
    position: relative;
    animation: vinyl-spin 4s linear infinite;
}

@keyframes vinyl-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.t-vinyl::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(
        from 45deg,
        rgba(255,255,255,0) 10%,
        rgba(255,255,255,0.25) 25%,
        rgba(255,255,255,0) 40%,
        rgba(255,255,255,0) 60%,
        rgba(255,255,255,0.25) 75%,
        rgba(255,255,255,0) 90%
    );
    pointer-events: none; z-index: 1;
}

.t-vinyl::after {
    content: ''; position: absolute; inset: 12px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.8);
    box-shadow: 0 0 0 0.5px rgba(255,255,255,0.15);
    pointer-events: none; z-index: 1;
}

.t-label {
    width: 20px; height: 20px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #d4d4d4);
    border: 0.5px solid rgba(0,0,0,0.5);
    box-shadow: 0 1px 4px rgba(0,0,0,0.6);
    display: flex; justify-content: center; align-items: center; z-index: 2;
}

.t-hole {
    width: 4.5px; height: 4.5px; border-radius: 50%;
    background-color: #0a0a0c;
    box-shadow: inset 0 1.5px 2px rgba(0,0,0,1), 0 0.5px 0.5px rgba(255,255,255,0.8);
}

/* ── 分割线 ── */
.ticket-divider {
    position: relative; z-index: 10;
    margin: 35px 30px 0;
    border-bottom: 1px solid var(--subtle-line);
}

/* ══════════════════════════════════════
   App 图标网格
══════════════════════════════════════ */
.app-grid {
    position: relative; z-index: 10;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px 12px;
    padding: 45px 42px 0;
}

.app-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.2,0.8,0.2,1);
}
.app-item:active { transform: scale(0.85); }

.app-icon {
    width: 48px; height: 48px; border-radius: 16px;
    display: flex; justify-content: center; align-items: center;
    position: relative;
}

.app-icon.dark {
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%),
        linear-gradient(145deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.03) 100%);
    border: 1px solid var(--ink-black);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05), inset 0 1px 2px rgba(255,255,255,0.3);
}

.app-icon.light {
    background-color: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(28,28,30,0.15);
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.app-label {
    font-size: 8px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--ink-black); opacity: 0.7;
}

/* ══════════════════════════════════════
   Dock 栏
══════════════════════════════════════ */
.dock-bar {
    position: absolute;
    bottom: calc(env(safe-area-inset-bottom, 20px) + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    height: 60px;
    width: max-content;
    padding: 0 16px;
    gap: 12px;
    background-color: #000000;
    border-radius: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow:
        0 20px 50px rgba(0,0,0,0.4),
        0 8px 16px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.18),
        inset 0 -1px 0 rgba(255,255,255,0.04);
}

.dock-bar::before {
    content: '';
    position: absolute; top: 1px; left: 16px; right: 16px; height: 1px;
    background: linear-gradient(to right,
        transparent,
        rgba(255,255,255,0.3) 25%,
        rgba(255,255,255,0.45) 50%,
        rgba(255,255,255,0.3) 75%,
        transparent);
    border-radius: 50%;
    pointer-events: none;
}

.dock-item {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; position: relative;
    transition: transform 0.2s cubic-bezier(0.2,0.8,0.2,1);
    background: rgba(255,255,255,0.12);
}
.dock-item:active {
    transform: scale(0.82);
    background: rgba(255,255,255,0.07);
}

.dock-sep {
    width: 1px; height: 22px; flex-shrink: 0;
    background: linear-gradient(to bottom,
        transparent,
        rgba(255,255,255,0.18) 30%,
        rgba(255,255,255,0.18) 70%,
        transparent);
}
