/* ========================================================================
    AnyBlocks.De – Rewarded Ads System (Modern & Clean)
    Hauptfarbe: #ffe500 | Modernes, professionelles Design
    ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* ---- Custom Properties ---- */
:root {
    --primary: #ffe500;
    --primary-dark: #d4bf00;
    --primary-light: #fff566;
    --primary-glow: rgba(255, 229, 0, 0.15);
    --bg-dark: #0f1117;
    --bg-card: #161b22;
    --bg-card-hover: #1c2128;
    --text: #e6edf3;
    --text-dim: #8b949e;
    --success: #1a7f37;
    --error: #ffe500;
    --radius: 12px;
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; text-decoration: underline; }

/* ---- Background ambient light ---- */
body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 40%, rgba(255, 229, 0, 0.02) 0%, transparent 100%),
        radial-gradient(ellipse 50% 60% at 80% 25%, rgba(255, 229, 0, 0.015) 0%, transparent 100%);
    pointer-events: none; z-index: 0;
}

/* ---- Particle Canvas ---- */
#particles {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}

/* ---- Layout Container ---- */
.container {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 2rem 1.25rem;
}

/* ---- Logo / Header ---- */
.logo {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--text);
    margin-bottom: .4rem;
    text-align: center;
    animation: fadeInDown .7s ease-out both;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: .9rem;
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown .7s ease-out .1s both;
}

/* ---- Card ---- */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 229, 0, 0.08);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 460px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 1px rgba(255, 229, 0, 0.05);
    animation: fadeInUp .6s ease-out .2s both;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: rgba(255, 229, 0, 0.2);
    opacity: 1;
}

.card-wide {
    max-width: 820px;
}

/* ---- Card Header ---- */
.card-header { text-align: center; margin-bottom: 2rem; }

.card-header h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    color: var(--text);
    line-height: 1.3;
    margin-bottom: .75rem;
}

.card-header p {
    color: var(--text-dim);
    font-size: .95rem;
}

/* ---- Coin Badge ---- */
.coin-badge {
    display: inline-flex; align-items: center; gap: .6rem;
    background: rgba(255, 229, 0, 0.08);
    border: 1px solid rgba(255, 229, 0, 0.22);
    border-radius: 8px;
    padding: .7rem 1.5rem;
    margin: 1rem 0;
    font-weight: 600; color: var(--primary);
    animation: none;
}

.coin-icon { font-size: 1.4rem; }

/* ---- Form Elements ---- */
.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    font-size: .82rem; font-weight: 500;
    color: var(--text-dim);
    margin-bottom: .5rem;
}

.form-input {
    width: 100%; padding: .9rem 1rem;
    background: var(--bg-dark);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color .3s, box-shadow .3s;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 229, 0, 0.1);
}

.form-input::placeholder { color: rgba(255,255,255,.18); }

/* ---- Custom Checkbox ---- */
.checkbox-group {
    display: flex; align-items: flex-start; gap: .75rem;
    margin-bottom: 1.5rem; cursor: pointer;
    -webkit-user-select: none; user-select: none;
}

.checkbox-group input[type="checkbox"] { display: none; }

.checkbox-custom {
    width: 22px; height: 22px; min-width: 22px;
    border: 2px solid rgba(255,255,255,.14);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    transition: all .25s ease;
    margin-top: 1px;
}

.checkbox-group input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 229, 0, 0.2);
}

.checkbox-group input:checked + .checkbox-custom::after {
    content: '✓'; color: var(--bg-dark);
    font-size: .7rem; font-weight: 800;
}

.checkbox-label {
    font-size: .8rem; color: var(--text-dim); line-height: 1.55;
}

/* ---- Button ---- */
.btn-primary {
    width: 100%; padding: 1rem;
    background: var(--primary);
    border: none; border-radius: 8px;
    color: #0f1117;
    font-size: .95rem; font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 229, 0, 0.3);
}

.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-primary:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary .shimmer {
    position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.1) 50%, transparent 70%);
    transform: translateX(-100%);
    pointer-events: none;
}

.btn-primary:hover:not(:disabled) .shimmer {
    animation: shimmer .75s ease forwards;
}

/* Icon styling */
.coin-icon {
    font-size: 1.3rem;
    display: inline-block;
}

.btn-primary i {
    display: inline-block;
    vertical-align: -0.125em;
}

/* ---- Error Message ---- */
.error-message {
    background: rgba(255, 229, 0, 0.08);
    border: 1px solid rgba(255, 229, 0, 0.2);
    border-radius: 8px;
    padding: .75rem 1rem;
    color: var(--primary);
    font-size: .85rem;
    margin-bottom: 1.25rem;
    display: none;
    font-weight: 500;
}

.error-message.show {
    display: block;
    animation: shake .4s ease-out;
}

/* ========================================================================
   WATCH PAGE
   ======================================================================== */
.watch-layout {
    width: 100%;
    max-width: 820px;
    display: flex; flex-direction: column; gap: 1.5rem;
}

.ad-space {
    background: var(--bg-card);
    border: 1px solid rgba(255, 229, 0, 0.08);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    min-height: 320px;
    display: flex; align-items: center; justify-content: center;
    animation: fadeInUp .6s ease-out .15s both;
    position: relative; overflow: hidden;
}

.ad-space::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: rgba(255, 229, 0, 0.15);
    opacity: 1;
}

.ad-placeholder { text-align: center; }

.ad-placeholder .sign {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(.9rem, 1.8vw, 1.1rem);
    font-weight: 500;
    color: var(--text-dim);
    background: rgba(255, 229, 0, 0.04);
    border: 2px dashed rgba(255, 229, 0, 0.15);
    border-radius: 10px;
    padding: 2rem 2.5rem;
    line-height: 1.6;
    display: inline-block;
    animation: none;
}

/* ---- Progress Section ---- */
.progress-section {
    animation: fadeInUp .6s ease-out .3s both;
}

.progress-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 229, 0, 0.08);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
}

.progress-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem;
}

.progress-text {
    font-size: .85rem; color: var(--text-dim);
}

.progress-timer {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: .9rem; color: var(--primary);
    min-width: 3ch; text-align: right;
}

.progress-bar-outer {
    width: 100%; height: 14px;
    background: rgba(255, 229, 0, 0.08);
    border-radius: 7px; overflow: hidden;
    position: relative;
}

.progress-bar-inner {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-light));
    border-radius: 7px;
    transition: width .15s linear;
    box-shadow: 0 0 8px rgba(255, 229, 0, 0.25);
    position: relative;
}

.progress-bar-inner::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
    animation: progressShine 2s ease-in-out infinite;
}

.progress-info {
    text-align: center; margin-top: 1rem;
    font-size: .8rem; color: var(--text-dim);
    transition: color .3s;
}

/* ========================================================================
   THANK-YOU PAGE
   ======================================================================== */
.success-icon {
    width: 90px; height: 90px;
    background: rgba(26, 127, 55, 0.1);
    border: 2px solid rgba(26, 127, 55, 0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.2rem;
    color: var(--success);
    animation: scaleIn .6s cubic-bezier(.175,.885,.32,1.275) .25s both;
}

.success-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    color: var(--text);
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.3;
    animation: fadeInUp .6s ease-out .35s both;
}

.success-message {
    text-align: center; color: var(--text-dim);
    line-height: 1.7; margin-bottom: 1.75rem;
    animation: fadeInUp .6s ease-out .45s both;
}

.success-username {
    color: var(--primary); font-weight: 600;
}

.rejoin-hint {
    background: rgba(255, 229, 0, 0.05);
    border: 1px solid rgba(255, 229, 0, 0.15);
    border-radius: 10px;
    padding: 1.1rem 1.4rem;
    text-align: center;
    animation: fadeInUp .6s ease-out .55s both;
}

.rejoin-hint .server-ip {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: clamp(.85rem, 2vw, 1rem);
    color: var(--primary);
    display: block; margin-top: .5rem;
    letter-spacing: 0.5px;
}

.rejoin-hint p {
    font-size: .85rem; color: var(--text-dim);
}

.btn-back {
    display: inline-block;
    margin-top: 1.5rem;
    padding: .7rem 1.8rem;
    background: rgba(255, 229, 0, 0.05);
    border: 1px solid rgba(255, 229, 0, 0.3);
    border-radius: 8px;
    color: var(--primary);
    font-size: .85rem; font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    animation: fadeInUp .6s ease-out .65s both;
}

.btn-back:hover {
    background: rgba(255, 229, 0, 0.12);
    border-color: rgba(255, 229, 0, 0.45);
    text-decoration: none;
    opacity: 1;
}

/* ---- Confetti (Thank-you page) ---- */
.confetti-piece {
    position: fixed; top: -20px;
    width: 10px; height: 10px;
    border-radius: 2px;
    z-index: 100; pointer-events: none;
    animation: confettiFall linear forwards;
}

/* ---- Footer ---- */
.legal-links {
    margin-top: 2.5rem;
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    text-align: center;
    font-size: .8rem;
    color: var(--text-dim);
    opacity: .78;
    animation: fadeInUp .6s ease-out .5s both;
    flex-wrap: wrap;
    justify-content: center;
}

.legal-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color .2s ease, opacity .2s ease;
}

.legal-links a:hover {
    color: var(--primary);
    opacity: 1;
    text-decoration: none;
}

.legal-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 229, 0, 0.55);
}

.legal-page {
    width: 100%;
    max-width: 760px;
}

.legal-card {
    max-width: 760px;
    padding: 2.25rem;
}

.legal-meta {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    background: rgba(255, 229, 0, 0.08);
    border: 1px solid rgba(255, 229, 0, 0.16);
    color: var(--primary);
    font-size: .8rem;
    margin-bottom: 1.25rem;
}

.legal-intro {
    color: var(--text-dim);
    margin-bottom: 1.75rem;
}

.legal-section + .legal-section {
    margin-top: 1.5rem;
}

.legal-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .45rem;
}

.legal-section p,
.legal-section li {
    color: var(--text-dim);
    font-size: .95rem;
}

.legal-section ul {
    padding-left: 1.1rem;
}

.legal-note {
    margin-top: 1.5rem;
    padding: .95rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 229, 0, 0.18);
    background: rgba(255, 229, 0, 0.05);
    color: var(--text-dim);
}

/* ========================================================================
   ANIMATIONS
   ======================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(.4); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 229, 0, 0); }
    50%      { box-shadow: 0 0 12px 2px rgba(255, 229, 0, 0.1); }
}

@keyframes shimmer {
    to { transform: translateX(100%); }
}
@keyframes progressShine {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(220%); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%  { transform: translateX(-6px); }
    40%  { transform: translateX(5px); }
    60%  { transform: translateX(-4px); }
    80%  { transform: translateX(2px); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes confettiFall {
    0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(105vh) rotate(720deg) scale(.4); opacity: 0; }
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 640px) {
    .container { padding: 1.25rem .75rem; }
    .card { padding: 1.75rem 1.25rem; }
    .ad-space { padding: 2rem 1rem; min-height: 240px; }
    .progress-card { padding: 1.25rem; }
    .ad-placeholder .sign { padding: 1.5rem 1rem; }
    .progress-header { flex-direction: column; gap: .5rem; align-items: flex-start; }
    .legal-links { gap: .65rem; font-size: .78rem; }
    .legal-card { padding: 1.5rem 1.25rem; }
}
