/* ====== Font Faces ====== */
@font-face {
    font-family: 'RedHatDisplay';
    src: url('../font/RedHatDisplay-Light.woff2') format('woff2');
    font-weight: 300;
}

@font-face {
    font-family: 'RedHatDisplay';
    src: url('../font/RedHatDisplay-Bold.woff2') format('woff2');
    font-weight: 700;
}

@font-face {
    font-family: 'RedHatDisplay';
    src: url('../font/RedHatDisplay-Bold.woff2') format('woff2');
    font-weight: 900;
}

@font-face {
    font-family: 'OPPOSans';
    src: url('../font/OPPOSans4-Medium.woff2') format('woff2');
    font-weight: 500;
}

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

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: 'RedHatDisplay', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    background-color: #fff;
    overflow-x: hidden;
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: url('../lucky/survey/survey_bg.jpg');
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    background-color: #c0d4f0;
    min-height: 100vh;
}

/* ====== Header ====== */
.header {
    width: 100%;
    max-width: 750px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 20px 0;
}

.logo {
    height: 16px;
    width: auto;
}

/* ====== Hero Section ====== */
.hero {
    width: 100%;
    max-width: 750px;
    position: relative;
    padding: 20px 20px 0;
    min-height: 0;
}

.hero-title {
    font-family: 'RedHatDisplay', sans-serif;
    font-weight: 900;
    font-size: 20px;
    line-height: 1.3;
    color: #000;
    max-width: 55%;
    margin-top: 10px;
    margin-bottom: 39px;
}

/* ====== Form Card ====== */
.form-card {
    width: calc(100% - 40px);
    max-width: 690px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 24px 14px 40px;
    margin-top: 0;
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ====== Field Groups ====== */
.field-group {
    margin-bottom: 16px;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
}

.required-icon {
    width: 8px;
    height: 8px;
}

.field-input {
    width: 100%;
    height: 40px;
    background: #f2f5fd;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 0 12px;
    font-size: 14px;
    font-family: 'RedHatDisplay', sans-serif;
    font-weight: 300;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.field-input:focus {
    border-color: #0028aa;
}

/* ====== OR Divider ====== */
.or-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 8px 0 16px;
}

.or-line {
    width: 68px;
    height: 1px;
    background: #d0d0d0;
}

.or-text {
    font-family: 'OPPOSans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

/* ====== Platform Selector ====== */
.platform-selector {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 10px;
}

.platform-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    transition: transform 0.06s ease-out;
}
.platform-option:active,
.platform-option.is-pressed {
    transform: scale(0.9);
}

.platform-radio {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 40, 170, 0.5);
    position: relative;
    transition: border-color 0.2s;
}

.platform-radio.checked {
    border-color: #0028aa;
}

.platform-radio.checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #0028aa;
}

.platform-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    /* 未选中：去色 + 变淡 */
    filter: grayscale(1);
    opacity: 0.4;
    transition: filter 0.2s, opacity 0.2s, transform 0.2s;
}

/* 选中：恢复原色并点亮 */
.platform-option.selected .platform-icon {
    filter: none;
    opacity: 1;
    transform: scale(1.08);
}

/* ====== Submit Button ====== */
.submit-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, #4a6cf7 0%, #6b3ff7 100%);
    color: #fff;
    font-family: 'RedHatDisplay', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: auto;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
    transition: transform 0.06s ease-out, box-shadow 0.06s ease-out, filter 0.06s ease-out;
}

/* 按下态由 js/press-feedback.js 加 .is-pressed，:active 兜底 */
.submit-btn:active,
.submit-btn.is-pressed {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 1px 4px rgba(74, 108, 247, 0.3);
    filter: brightness(0.9);
}
.submit-btn.is-released {
    animation: btn-bounce 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes btn-bounce {
    0%   { transform: translateY(2px) scale(0.98); }
    60%  { transform: translateY(-1px) scale(1.01); }
    100% { transform: none; }
}

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

/* ====== Toast ====== */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px 20px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    font-size: 13px;
}

#toast.show {
    visibility: visible;
    animation: fadein 0.3s, fadeout 0.3s 2.7s;
}

@keyframes fadein {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes fadeout {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ====== Responsive ====== */
@media (max-width: 375px) {
    .header {
        padding: 24px 16px 0;
    }
    .hero {
        padding: 16px 16px 70px;
    }
    .hero-title {
        font-size: 18px;
    }
    .form-card {
        padding: 20px 12px 32px;
    }
}

@media (min-width: 750px) {
    .header,
    .hero,
    .form-card {
        max-width: 750px;
    }
}
