:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5, #3730a3);
    --primary-hover: linear-gradient(135deg, #4338ca, #2e2692);
    --success-color: #10b981;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --error-color: #ef4444;
    --error-bg: #fef2f2;
    --error-border: #fca5a5;
    --text-main: #0f172a;
    --text-muted: #64748b;
}

.gift-wrapper {
    width: 100%;
    padding: 40px 16px;
    padding-top: 30px;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    justify-content: center;
}

.gift-container {
    width: 100%;
    max-width: 580px;
}

.gift-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
}

.gift-alert.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: #991b1b;
}

.gift-alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.gift-header {
    text-align: center;
    margin-bottom: 32px;
}

.gift-subtitle {
    color: #4f46e5;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    display: inline-block;
    background: #eeebff;
    padding: 6px 16px;
    border-radius: 99px;
    margin-bottom: 12px;
}

.gift-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.gift-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.04), 0 10px 10px -5px rgba(15, 23, 42, 0.02);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gift-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 40px -10px rgba(15, 23, 42, 0.08);
}

.gift-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f5f3ff, #e0e7ff);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    position: relative;
}

.gift-icon {
    font-size: 38px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-6px) rotate(3deg);
    }
}

.gift-card h3 {
    font-size: 22px;
    color: var(--text-main);
    margin: 0 0 12px 0;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.gift-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 28px 0;
}

.info-license-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 28px;
    text-align: left;
}

.info-license-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.info-license-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-license-item:first-child {
    padding-top: 0;
}

.info-license-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-license-value {
    color: var(--text-main);
    font-weight: 600;
}

.btn-claim {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    cursor: pointer;
    width: 80%;
    transition: all 0.2s ease;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.2);
    display: inline-block;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-claim:hover {
    box-shadow: 0 15px 20px -5px rgba(79, 70, 229, 0.3);
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-claimed {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    width: 80%;
    cursor: not-allowed;
}

.security-note {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.gift-footer-note {
    display: block;
    margin-top: 28px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .gift-wrapper {
        padding: 24px 12px;
    }

    .gift-header {
        margin-bottom: 24px;
    }

    .gift-title {
        font-size: 24px;
    }

    .gift-card {
        padding: 32px 20px;
        border-radius: 24px;
    }

    .gift-icon-wrapper {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .gift-icon {
        font-size: 32px;
    }

    .gift-card h3 {
        font-size: 19px;
    }

    .gift-card p {
        margin-bottom: 24px;
    }

    .success-embedded-box {
        padding: 16px;
        border-radius: 16px;
    }

    .key-input-wrapper {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }

    .key-display {
        text-align: center;
        padding: 4px 0;
    }

    .btn-copy {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .info-license-box {
        padding: 14px;
    }

    .info-license-item {
        font-size: 13px;
        padding: 8px 0;
    }

    .btn-claim,
    .btn-claimed {
        padding: 14px 20px;
        font-size: 15px;
    }
}

.success-embedded-box {
    background: var(--success-bg);
    border: 2px dashed var(--success-border);
    border-radius: 24px;
    padding: 36px 32px;
    margin: 16px 0 36px 0;
    text-align: left;
    animation: fadeIn 0.4s ease;

    display: flex;
    flex-direction: column;
}

.success-embedded-title {
    font-size: 18px;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 16px;

    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.success-embedded-title svg {
    flex-shrink: 0;
}

.success-embedded-warning {
    font-size: 14.5px;
    color: var(--error-color);
    font-weight: 500;
    margin-bottom: 32px;
    line-height: 1.6;

    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.key-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 10px 10px 10px 20px;
    transition: all 0.2s ease;
    gap: 20px;
}

.key-input-wrapper:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.key-display {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    padding: 8px 0;
    letter-spacing: 0.06em;
    flex: 1;
}

.key-display:focus,
.key-display:active {
    outline: none !important;
    box-shadow: none !important;
}

.btn-copy {
    background: var(--text-main);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-copy:hover {
    background: #1e293b;
}

.btn-copy.copied {
    background: var(--success-color);
}