@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #08090d;
    --card-bg: rgba(255, 255, 255, 0.055);
    --card-border: rgba(255, 255, 255, 0.10);
    --text-primary: #f3f4f7;
    --text-secondary: rgba(243, 244, 247, 0.58);
    --accent: #7c8bff;
    --accent-soft: rgba(124, 139, 255, 0.16);
    --star-idle: rgba(255, 255, 255, 0.16);
    --star-fill: #ffb648;
    --success: #5fe0a6;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ambient shader layer sits behind everything, fixed to viewport */
.fx-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.fx-bg .fx-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* soft vignette so the shader never fights the card for attention */
.fx-vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 38%, transparent 0%, transparent 35%, var(--bg) 92%);
}

.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 22px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.brand svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 36px 32px 32px;
    text-align: center;
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 24px 60px -20px rgba(0, 0, 0, 0.65);
    animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

h1 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.subtitle {
    margin: 0 0 28px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}

.star {
    font-size: 34px;
    line-height: 1;
    color: var(--star-idle);
    cursor: pointer;
    user-select: none;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s ease;
}

.star:hover {
    transform: translateY(-2px) scale(1.08);
}

.star.hover,
.star.active {
    color: var(--star-fill);
}

.star.active {
    text-shadow: 0 0 18px rgba(255, 182, 72, 0.45);
}

.comment-section {
    margin-top: 24px;
    text-align: left;
    animation: expand 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes expand {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

textarea {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

textarea::placeholder {
    color: rgba(243, 244, 247, 0.32);
}

textarea:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.submit-btn {
    width: 100%;
    margin-top: 14px;
    padding: 13px 16px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: #0b0d16;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
}

.submit-btn:hover:not(:disabled) {
    filter: brightness(1.08);
}

.submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.success {
    padding: 12px 0 4px;
    animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.success-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(95, 224, 166, 0.14);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success p {
    margin: 0;
    font-size: 15px;
    color: var(--text-secondary);
}

@media (max-width: 420px) {
    .card {
        padding: 30px 22px 26px;
        border-radius: 18px;
    }

    h1 {
        font-size: 19px;
    }

    .star {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}