.jds-lucky-form-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.jds-lucky-form-container:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.jds-form-title {
    margin: 0 0 15px;
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    text-align: center;
    line-height: 1.4;
}

.jds-form-description {
    margin: 0 0 20px;
    font-size: 15px;
    color: #666666;
    text-align: center;
    line-height: 1.6;
}

.jds-form-fields {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.jds-lucky-form-container.layout-inline .jds-form-fields {
    flex-direction: row;
    align-items: stretch;
}

.jds-lucky-form-container.layout-inline .jds-input-wrapper {
    flex: 1;
}

.jds-lucky-form-container.layout-stacked .jds-form-fields {
    flex-direction: column;
}

.jds-lucky-form-container.layout-stacked .jds-input-wrapper,
.jds-lucky-form-container.layout-stacked .jds-submit-button {
    width: 100%;
}

.jds-input-wrapper {
    position: relative;
}

.jds-code-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.jds-code-input::placeholder {
    color: #999999;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

.jds-code-input:focus {
    background: #ffffff;
    border-color: #ffd700;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.1);
}

.jds-code-input:hover {
    border-color: #d4af37;
}

.jds-lucky-form-container.size-small .jds-code-input {
    padding: 8px 12px;
    font-size: 14px;
}

.jds-lucky-form-container.size-medium .jds-code-input {
    padding: 12px 16px;
    font-size: 16px;
}

.jds-lucky-form-container.size-large .jds-code-input {
    padding: 16px 20px;
    font-size: 18px;
}

.jds-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #8b6914;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.jds-submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.jds-submit-button:hover::before {
    left: 100%;
}

.jds-submit-button:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.jds-submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.jds-submit-button:disabled,
.jds-submit-button.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.jds-button-icon {
    display: inline-flex;
    align-items: center;
    font-size: 18px;
}

.jds-button-icon i,
.jds-button-icon svg {
    width: 18px;
    height: 18px;
}

.jds-submit-button.loading .jds-button-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.jds-lucky-form-container.size-small .jds-submit-button {
    padding: 8px 16px;
    font-size: 14px;
}

.jds-lucky-form-container.size-medium .jds-submit-button {
    padding: 12px 24px;
    font-size: 16px;
}

.jds-lucky-form-container.size-large .jds-submit-button {
    padding: 16px 32px;
    font-size: 18px;
}

.jds-form-response {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-top: 15px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jds-form-response.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.jds-form-response.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.jds-help-text {
    margin-top: 15px;
    padding: 12px 16px;
    background: #f0f8ff;
    border-right: 4px solid #4a90e2;
    border-radius: 6px;
    font-size: 13px;
    color: #2c5282;
    line-height: 1.6;
}

.jds-lucky-form-container.animation-fade {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.jds-lucky-form-container.animation-slide {
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jds-lucky-form-container.animation-zoom {
    animation: zoomIn 0.6s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.jds-lucky-form-container.animation-bounce {
    animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.jds-lucky-form-container.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-10px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(10px);
    }
}

.jds-lucky-form-container.celebrate {
    animation: celebrate 0.6s ease;
}

@keyframes celebrate {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.05) rotate(2deg);
    }

    50% {
        transform: scale(1.1) rotate(-2deg);
    }

    75% {
        transform: scale(1.05) rotate(1deg);
    }
}

@media (max-width: 768px) {
    .jds-lucky-form-container {
        padding: 20px;
        border-radius: 12px;
    }

    .jds-form-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .jds-form-description {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .jds-lucky-form-container.layout-inline .jds-form-fields {
        flex-direction: column;
    }

    .jds-lucky-form-container.layout-inline .jds-input-wrapper,
    .jds-lucky-form-container.layout-inline .jds-submit-button {
        width: 100%;
    }

    .jds-code-input {
        font-size: 14px;
        padding: 10px 14px;
    }

    .jds-submit-button {
        font-size: 14px;
        padding: 10px 20px;
    }

    .jds-help-text {
        font-size: 12px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .jds-lucky-form-container {
        padding: 16px;
    }

    .jds-form-title {
        font-size: 18px;
    }

    .jds-form-description {
        font-size: 13px;
    }

    .jds-form-fields {
        gap: 10px;
    }

    .jds-code-input {
        font-size: 13px;
        padding: 8px 12px;
        letter-spacing: 1px;
    }

    .jds-submit-button {
        font-size: 13px;
        padding: 8px 16px;
    }

    .jds-button-icon {
        font-size: 16px;
    }
}

@media (prefers-color-scheme: dark) {
    .jds-lucky-form-container {
        background: #1e1e1e;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .jds-form-title {
        color: #ffffff;
    }

    .jds-form-description {
        color: #b0b0b0;
    }

    .jds-code-input {
        background: #2a2a2a;
        border-color: #404040;
        color: #ffffff;
    }

    .jds-code-input::placeholder {
        color: #707070;
    }

    .jds-code-input:focus {
        background: #333333;
        border-color: #ffd700;
    }

    .jds-help-text {
        background: #2a3f5f;
        border-right-color: #4a90e2;
        color: #a8c5e2;
    }

    .jds-form-response.success {
        background: #1e4620;
        color: #a3d9a5;
        border-color: #2d5f2e;
    }

    .jds-form-response.error {
        background: #4a1e1e;
        color: #f5a3a3;
        border-color: #6b2c2c;
    }
}

.jds-submit-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.jds-submit-button:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

.jds-input-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    border-radius: 10px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.jds-code-input:focus+.jds-input-wrapper::before {
    opacity: 1;
}

[dir="rtl"] .jds-help-text {
    border-right: none;
    border-left: 4px solid #4a90e2;
}

[dir="rtl"] .jds-button-icon {
    margin-right: 0;
    margin-left: 8px;
}

@media print {
    .jds-lucky-form-container {
        box-shadow: none;
        border: 1px solid #e0e0e0;
    }

    .jds-submit-button {
        display: none;
    }

    .jds-form-response {
        page-break-inside: avoid;
    }
}