/*
Theme Name: Blocksy Child Theme 15
Theme URI: https://dramatv.com
Author: Qtonz
Description: DiamondDrop - mobile-first diamond pack theme. UID form, pack grid and Congratulations screen. All content comes from one JSON file (data/diamonds.json) - no API calls yet.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blocksy-child-theme-15
Tags: custom-theme, json-data, game, diamonds, mobile-first
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
    --bg-top: #0e0a16;
    --bg-bottom: #2b0d3b;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.72);
    --yellow: #ffd60a;
    --green: #2fe07a;
    --pink: #ff1f8f;
    --purple: #a21cf0;
    --panel: linear-gradient(180deg, rgba(76, 36, 104, 0.55), rgba(52, 22, 72, 0.55));
    --panel-border: #b42bd8;
    --card: rgba(62, 34, 84, 0.42);
    --card-border: rgba(255, 255, 255, 0.2);
    --radius: 14px;
    --gutter: 16px;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background: var(--bg-top);
}

body.dc {
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--text);
    background:
        radial-gradient(120% 60% at 50% 100%, rgba(120, 24, 150, 0.45), transparent 70%),
        linear-gradient(180deg, var(--bg-top) 0%, #160d22 45%, var(--bg-bottom) 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body.dc a {
    color: inherit;
    text-decoration: none;
}

body.dc img {
    max-width: 100%;
    display: block;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.dc-app {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom));
}

.dc-yellow {
    color: var(--yellow);
}

/* ==========================================================================
   Header
   ========================================================================== */

.dc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0 12px;
}

.dc-header-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.dc-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #fff;
    overflow: hidden;
    flex: 0 0 auto;
}

.dc-logo.has-img {
    background: none;
    box-shadow: 0 0 14px rgba(210, 27, 193, 0.45);
}

.dc-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Panels (form card + success card)
   ========================================================================== */

.dc-panel {
    position: relative;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: 0 0 22px rgba(180, 43, 216, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 16px 12px 18px;
    text-align: center;
}

.dc-form-title {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
}

.dc-form-title .dc-yellow {
    font-weight: 700;
}

.dc-form-sub {
    margin: 2px 0 14px;
    font-size: 11.5px;
    color: var(--muted);
}

.dc-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dc-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 2px solid transparent;
    border-radius: 7px;
    background: #fff;
    color: #1d1426;
    font: 500 14px/1 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.dc-input::placeholder {
    color: #8a8592;
}

.dc-input:focus {
    border-color: var(--purple);
}

.dc-input.is-invalid {
    border-color: var(--pink);
}

.dc-error {
    margin: -4px 0 0;
    font-size: 12px;
    color: #ff7ab8;
}

.dc-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 222px;
    height: 40px;
    padding: 0 22px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--purple) 0%, #d21bc1 55%, var(--pink) 100%);
    box-shadow: 0 4px 18px rgba(255, 31, 143, 0.35);
    color: #fff;
    font: 600 13px/1 'Poppins', sans-serif;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
}

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

.dc-btn .dc-svg {
    flex: 0 0 auto;
}

.dc-btn.is-loading {
    pointer-events: none;
    filter: saturate(0.7) brightness(0.9);
}

.dc-btn.is-loading span,
.dc-btn.is-loading .dc-svg {
    visibility: hidden;
}

.dc-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dc-spin 0.7s linear infinite;
}

/* Success card */

.dc-success-card {
    padding: 12px 12px 16px;
}

.dc-success-media {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
}

.dc-success-glow {
    position: absolute;
    inset: 10px 25%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(70, 170, 255, 0.45), transparent 70%);
    filter: blur(8px);
    animation: dc-glow 2.4s ease-in-out infinite;
}

.dc-success-img {
    position: relative;
    height: 150px;
    width: auto;
    object-fit: contain;
    animation: dc-pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both, dc-float 3s ease-in-out 0.6s infinite;
}

.dc-success-title {
    margin: 10px 0 2px;
    font-size: 17px;
    font-weight: 700;
    color: var(--green);
}

.dc-success-text {
    margin: 0;
    font-size: 12.5px;
}

.dc-success-text strong {
    font-weight: 700;
}

/* ==========================================================================
   "Available Diamonds Pack" heading
   ========================================================================== */

.dc-packs-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 22px calc(var(--gutter) * -0.5) 4px;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.dc-packs-title > span:not(.dc-line) {
    flex: 0 0 auto;
}

.dc-line {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    min-width: 24px;
    height: 3px;
    color: var(--yellow);
    background: linear-gradient(90deg, transparent, var(--yellow));
}

.dc-line .dc-svg {
    margin-left: auto;
    margin-right: -2px;
}

.dc-line--right {
    background: linear-gradient(270deg, transparent, var(--yellow));
}

.dc-line--right .dc-svg {
    margin-left: -2px;
    margin-right: 0;
    transform: scaleX(-1);
}

/* ==========================================================================
   Pack grid
   ========================================================================== */

.dc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    margin-top: 14px;
}

.dc-pack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    aspect-ratio: 152 / 145;
    padding: 12px 10px 10px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--card-border);
    transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.dc-pack:hover,
.dc-pack:focus-visible {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 16px rgba(162, 28, 240, 0.35);
    outline: none;
}

.dc-pack:active,
.dc-pack.is-pressed {
    transform: scale(0.96);
}

.dc-pack.is-active {
    border-color: var(--panel-border);
    box-shadow: 0 0 16px rgba(180, 43, 216, 0.45);
}

.dc-pack-media {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
}

.dc-pack-media img {
    max-height: 100%;
    max-width: 92%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.dc-pack-amount {
    margin-top: 6px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1;
}

.dc-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
}

.dc-disclaimer {
    margin: 22px 0 0;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

/* ==========================================================================
   In-page ads (span both grid columns)
   ========================================================================== */

.dc-ad {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 14px 0;
}

.dc-grid .dc-ad {
    margin: 0;
}

.dc-ad-label {
    display: none;
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.dc-ad.is-filled .dc-ad-label {
    display: block;
}

.dc-ad-slot:empty {
    min-height: 0;
}

/* ==========================================================================
   Animations
   ========================================================================== */

.dc-shake {
    animation: dc-shake 0.4s;
}

@keyframes dc-spin {
    to { transform: rotate(360deg); }
}

@keyframes dc-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

@keyframes dc-pop {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes dc-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes dc-glow {
    0%, 100% { opacity: 0.6; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .dc-success-img,
    .dc-success-glow,
    .dc-shake {
        animation: none;
    }
}

@media (max-width: 340px) {
    .dc-grid { gap: 10px; }
    .dc-packs-title { font-size: 14px; }
    .dc-btn { min-width: 0; width: 100%; }
}
