/* Lucky Draw Google Form Styles */
.ldm-google-form-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.ldm-form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.ldm-form-step.active {
    display: block;
}

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

/* Form Header */
.ldm-form-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #2a809b 0%, #57C785 50%, #cdbf45 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.ldm-form-header h2 {
    margin: 0 0 10px 0;
    font-size: 25px;
    font-weight: 700;
}

.ldm-location-info {
    font-size: 17px;
    opacity: 0.9;
    margin: 0;
}

/* Google Form Container */
.ldm-google-form-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.ldm-form-instructions {
    background: #f8f9fa;
    padding: 20px;
    border-top: 3px solid #4CAF50;
}

.ldm-form-instructions ol {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.ldm-form-instructions li {
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

/* Loading Screen */
.ldm-loading-screen {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.ldm-spinner-large {
    width: 80px;
    height: 80px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

.ldm-processing-steps {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.ldm-step {
    padding: 15px 25px;
    background: #f8f9fa;
    border-radius: 10px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.ldm-step.active {
    background: #4CAF50;
    color: white;
    transform: scale(1.05);
}

/* Wheel Container */
.ldm-wheel-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.ldm-wheel-header {
    margin-bottom: 30px;
}

.ldm-wheel-header h2 {
    color: #333;
    font-size: 2.5em;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ldm-wheel-header p {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

/* Spinning Wheel */
.ldm-wheel-wrapper {
    position: relative;
    margin: 40px auto;
    max-width: 600px;
}

.ldm-wheel {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 20px #fff, 0 0 0 23px #ddd, 0 20px 50px rgba(0,0,0,0.2);
    transition: transform 3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.ldm-wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    left: 0;
    top: 0;
    overflow: hidden;
}

.ldm-wheel-text {
    position: absolute;
    left: -100%;
    width: 200%;
    height: 200%;
    text-align: center;
    padding-top: 20px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    transform-origin: center;
}

.ldm-wheel-center {
    position: absolute;
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.ldm-wheel-pointer {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ff4757;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.2));
}

/* Wheel Controls */
.ldm-wheel-controls {
    margin-top: 40px;
}

.ldm-spin-button {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.ldm-spin-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.6);
}

.ldm-spin-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ldm-spin-button.spinning {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.ldm-spin-icon {
    font-size: 1.8em;
}

.ldm-wheel-hint {
    color: #666;
    margin-top: 15px;
    font-style: italic;
}

/* Gifts List */
.ldm-wheel-gifts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.ldm-gift-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.ldm-gift-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.ldm-gift-name {
    font-weight: 600;
    color: #333;
}

/* Result Screen */
.ldm-result-success {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ldm-celebration {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.ldm-confetti {
    font-size: 24px;
    animation: bounce 2s infinite;
}

.ldm-confetti:nth-child(2) { animation-delay: 0.3s; }
.ldm-confetti:nth-child(3) { animation-delay: 0.6s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.ldm-result-success h2 {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.8em;
    margin: 0 0 10px 0;
}

.ldm-user-name {
    font-size: 1.8em;
    color: #333;
    margin: 0 0 40px 0;
    font-weight: 600;
}

.ldm-gift-reveal {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    padding: 40px;
    border-radius: 15px;
    margin: 30px 0;
    border: 3px dashed #ffb300;
}

.ldm-gift-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.ldm-gift-title {
    color: #ff6f00;
    font-size: 1.5em;
    margin: 0 0 10px 0;
}

.ldm-gift-name-large {
    font-size: 3em;
    font-weight: bold;
    color: #d84315;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.ldm-result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.ldm-detail-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ldm-detail-icon {
    font-size: 2em;
    min-width: 50px;
}

.ldm-detail-content h4 {
    margin: 0 0 5px 0;
    color: #555;
    font-size: 0.9em;
}

.ldm-detail-content p {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.ldm-instructions {
    background: #e3f2fd;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    text-align: left;
}

.ldm-instructions h4 {
    color: #1976d2;
    margin: 0 0 15px 0;
}

.ldm-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.ldm-instructions li {
    margin-bottom: 10px;
    color: #333;
}

.ldm-result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.ldm-action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    font-size: 1em;
}

.print-btn {
    background: #2196F3;
    color: white;
}

.screenshot-btn {
    background: #4CAF50;
    color: white;
}

.restart-btn {
    background: #9C27B0;
    color: white;
}

.ldm-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.ldm-btn-icon {
    font-size: 1.2em;
}

.ldm-result-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
}

.ldm-note {
    font-size: 0.9em;
    color: #999;
    margin-top: 10px;
}

/* Confetti Animation */
#ldm-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.ldm-confetti-piece {
    position: absolute;
    top: -50px;
    animation: fall 5s linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Error Screen */
.ldm-error-screen {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.ldm-error-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.ldm-error-message {
    color: #d32f2f;
    font-size: 1.2em;
    margin: 20px 0;
}

.ldm-retry-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
}

/* Manual Capture Form */
.ldm-manual-capture {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.ldm-manual-capture h3 {
    color: #333;
    margin: 0 0 20px 0;
}

.ldm-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.ldm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.ldm-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.ldm-form-group input:focus {
    border-color: #667eea;
    outline: none;
}

.ldm-loading-wheel {
    text-align: center;
    padding: 30px;
    font-size: 1.5em;
    color: #667eea;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    margin: 20px 0;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ldm-wheel {
        width: 300px;
        height: 300px;
    }
    
    .ldm-wheel-text {
        font-size: 10px;
        padding-top: 10px;
    }
    
    .ldm-result-details {
        grid-template-columns: 1fr;
    }
    
    .ldm-result-actions {
        flex-direction: column;
    }
    
    .ldm-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ldm-gift-name-large {
        font-size: 2em;
    }
}