/* ==============================
   StayCloud Bug Report — Styles
   ============================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --bg-primary: #0B0D17;
    --bg-card: rgba(17, 19, 35, 0.75);
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-input-focus: rgba(255, 255, 255, 0.07);
    --border-default: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(99, 102, 241, 0.5);
    --border-error: rgba(239, 68, 68, 0.6);
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-error: #F87171;
    --accent-start: #6366F1;
    --accent-end: #8B5CF6;
    --accent-pink: #F472B6;
    --success-start: #34D399;
    --success-end: #6366F1;
    --glow-1: rgba(99, 102, 241, 0.15);
    --glow-2: rgba(139, 92, 246, 0.1);
    --glow-3: rgba(244, 114, 182, 0.08);

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- Background Glows --- */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    animation: glowFloat 15s ease-in-out infinite alternate;
}

.bg-glow--1 {
    width: 600px;
    height: 600px;
    background: var(--glow-1);
    top: -200px;
    left: -100px;
}

.bg-glow--2 {
    width: 500px;
    height: 500px;
    background: var(--glow-2);
    top: 40%;
    right: -150px;
    animation-delay: -5s;
}

.bg-glow--3 {
    width: 400px;
    height: 400px;
    background: var(--glow-3);
    bottom: -100px;
    left: 30%;
    animation-delay: -10s;
}

@keyframes glowFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -20px) scale(1.1);
    }

    100% {
        transform: translate(-20px, 30px) scale(0.95);
    }
}

/* --- Container --- */
.container {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 auto;
    padding: 40px 20px;
    animation: fadeInUp 0.6s var(--transition-base) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Header --- */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header__logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.header__badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.12);
    color: #A5B4FC;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* --- Hero --- */
.hero {
    text-align: center;
    margin-bottom: 36px;
}

.hero__icon {
    display: inline-flex;
    margin-bottom: 20px;
}

.hero__icon svg {
    width: 56px;
    height: 56px;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.85;
    }
}

.hero__title {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 480px;
    margin: 0 auto;
}

/* --- Card --- */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 20px 60px -15px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* --- Form --- */
.form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.form__label-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.form__label-optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.form__input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.92rem;
    outline: none;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.form__input::placeholder {
    color: var(--text-muted);
}

.form__input:hover {
    background: var(--bg-input-focus);
    border-color: rgba(255, 255, 255, 0.1);
}

.form__input:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form__input--textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* --- Device Cards --- */
.device-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.device-card {
    cursor: pointer;
}

.device-card__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.device-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: var(--bg-input);
    transition: all var(--transition-fast);
    text-align: center;
}

.device-card__body:hover {
    background: var(--bg-input-focus);
    border-color: rgba(255, 255, 255, 0.12);
}

.device-card__input:checked+.device-card__body {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-start);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.device-card__icon {
    font-size: 1.5rem;
    line-height: 1;
}

.device-card__label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.2;
}

.device-card__input:checked+.device-card__body .device-card__label {
    color: #A5B4FC;
}

.form__group--error .device-card__body {
    border-color: var(--border-error);
}

/* Error state */
.form__group--error .form__input {
    border-color: var(--border-error);
}

.form__group--error .form__input:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form__group--error .form__label {
    color: var(--text-error);
}

.form__error {
    font-size: 0.78rem;
    color: var(--text-error);
    display: none;
    padding-left: 24px;
    animation: shakeIn 0.3s ease;
}

.form__group--error .form__error {
    display: block;
}

@keyframes shakeIn {
    0% {
        transform: translateX(-6px);
        opacity: 0;
    }

    40% {
        transform: translateX(4px);
    }

    70% {
        transform: translateX(-2px);
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Screenshots Grid --- */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.screenshot-add {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.screenshot-add:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.03);
}

.screenshot-add__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.screenshot-add__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    pointer-events: none;
}

.screenshot-add__content svg {
    width: 24px;
    height: 24px;
}

.screenshot-add__content span {
    font-size: 0.72rem;
    font-weight: 500;
}

/* Screenshot Preview Item */
.screenshot-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-default);
    animation: fadeIn 0.3s ease;
    aspect-ratio: 1;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.screenshot-item__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    transition: all var(--transition-fast);
}

.screenshot-item__remove svg {
    width: 12px;
    height: 12px;
    color: #F87171;
}

.screenshot-item__remove:hover {
    background: rgba(239, 68, 68, 0.4);
    transform: scale(1.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Submit Button --- */
.form__submit {
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: white;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    margin-top: 8px;
}

.form__submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.form__submit:hover::before {
    opacity: 1;
}

.form__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}

.form__submit:active {
    transform: translateY(0);
}

.form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form__submit-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form__submit-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* --- Success State --- */
.success {
    text-align: center;
    padding: 24px 0;
    animation: fadeInUp 0.5s ease both;
}

.success__icon {
    margin-bottom: 24px;
}

.success__icon svg {
    width: 72px;
    height: 72px;
    animation: successPop 0.5s ease both;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success__title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--success-start), var(--success-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 28px;
}

/* --- Footer --- */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
}

.footer p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 640px) {
    .container {
        padding: 24px 16px;
    }

    .hero__title {
        font-size: 1.5rem;
    }

    .hero__subtitle {
        font-size: 0.88rem;
    }

    .card {
        padding: 28px 20px;
        border-radius: var(--radius-lg);
    }

    .hero__icon svg {
        width: 44px;
        height: 44px;
    }

    .device-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .device-card__body {
        padding: 12px 6px;
    }

    .device-card__icon {
        font-size: 1.3rem;
    }

    .device-card__label {
        font-size: 0.7rem;
    }

    .screenshots-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bg-glow--1 {
        width: 350px;
        height: 350px;
    }

    .bg-glow--2 {
        width: 300px;
        height: 300px;
    }

    .bg-glow--3 {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 380px) {
    .header__logo-text {
        font-size: 1rem;
    }

    .header__badge {
        font-size: 0.62rem;
        padding: 4px 8px;
    }

    .hero__title {
        font-size: 1.3rem;
    }

    .card {
        padding: 24px 16px;
    }
}