* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 600px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

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

.header {
    margin-bottom: 40px;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 10px;
    font-weight: 500;
}

.tagline {
    font-size: 1rem;
    color: #777;
    font-weight: 400;
    line-height: 1.5;
}

.pricing-section {
    margin: 40px 0;
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

.pricing-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.pricing-card {
    background: white;
    border: 3px solid #e0e6ed;
    border-radius: 16px;
    padding: 25px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.pricing-card.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.checkbox-wrapper {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.pricing-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0;
}

.checkbox-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pricing-checkbox:checked + .checkbox-label {
    background: #667eea;
    border-color: #667eea;
}

.pricing-checkbox:checked + .checkbox-label::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 3px;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.premium-card {
    border-color: #ff6b6b;
    position: relative;
}

.premium-card::before {
    content: "⭐ POPULAR";
    position: absolute;
    top: -10px;
    right: 15px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 12px;
    transform: rotate(3deg);
}

.premium-card.selected {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.premium-card .pricing-checkbox:checked + .checkbox-label {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

.pricing-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.premium-card .price {
    color: #ff6b6b;
}

.pricing-card .description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.roast-styles {
    margin: 30px 0;
    padding: 25px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    border: 2px solid #f0f0f0;
}

.style-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.style-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.style-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.style-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.style-option input[type="radio"] {
    display: none;
}

.style-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.style-option input:checked ~ .style-checkmark {
    background: #667eea;
    border-color: #667eea;
}

.style-option input:checked ~ .style-checkmark::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.style-content {
    display: flex;
    flex-direction: column;
}

.style-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.style-desc {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

.payment-section {
    margin: 30px 0;
    padding: 25px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    border: 2px solid #e9ecef;
}

.payment-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.payment-summary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.payment-summary h4 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.payment-summary .summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.payment-summary .summary-item.total {
    border-top: 1px solid #dee2e6;
    padding-top: 10px;
    margin-top: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.stripe-elements {
    margin-bottom: 25px;
}

#card-element {
    background: white;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: border-color 0.3s ease;
}

#card-element:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

#card-errors {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 10px;
    padding: 10px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    display: none;
}

#card-errors.show {
    display: block;
}

.stripe-pay-btn {
    width: 100%;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stripe-pay-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.stripe-pay-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.stripe-spinner {
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.stripe-spinner.hidden {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upload-section {
    margin: 40px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

.upload-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.upload-btn:active {
    transform: translateY(-1px);
}

.upload-btn input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.photo-preview {
    width: 100%;
    max-width: 300px;
    height: 250px;
    margin: 0 auto;
    background: #f8f9fa;
    border: 3px dashed #dee2e6;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.photo-preview.has-image {
    border: none;
    background: none;
}

.photo-preview img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.roast-result {
    margin: 40px 0;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 30px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 500;
}

.generate-btn {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.footer {
    margin-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
        margin: 10px;
    }

    .title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .pricing-options,
    .upload-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .style-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pricing-card {
        padding: 20px 15px;
    }

    .upload-btn {
        padding: 18px;
        font-size: 1rem;
    }

    .photo-preview {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .container {
        padding: 25px 15px;
    }
}