/* Modern Modal System */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(40px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-content h2 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #1e293b, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Close Button */
.close-modal,
.close-demo-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    font-weight: 300;
    color: #64748b;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.close-modal:hover,
.close-demo-modal:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1) rotate(90deg);
}

/* Demo Modal Specific Styles */
.demo-modal {
    padding: 40px;
    text-align: center;
}

.demo-modal-header {
    margin-bottom: 30px;
}

.demo-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo-qr {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3);
}

.qr-pattern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    width: 30px;
    height: 30px;
}

.qr-row {
    display: contents;
}

.qr-block {
    width: 8px;
    height: 8px;
    border-radius: 1px;
}

.qr-block.filled-orange {
    background: #f97316;
}

.qr-block.filled-yellow {
    background: #fbbf24;
}

.brand-name {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Form Styling */
.demo-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    text-align: left;
    margin-top: 10px;
}

.form-group.checkbox input {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.form-group.checkbox label {
    margin-bottom: 0;
    font-weight: 400;
    color: #64748b;
    font-size: 0.9rem;
}

/* Demo Button */
.btn-demo-submit {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-demo-submit:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-demo-submit:active {
    transform: translateY(0);
}

/* Signup Modal Styles */
.signup-modal {
    padding: 40px;
    max-width: 700px;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.plan-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.plan-option {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.plan-option:hover {
    border-color: #fbbf24;
    background: rgba(255, 255, 255, 0.8);
}

.plan-option input[type="radio"] {
    position: absolute;
    top: 15px;
    right: 15px;
    transform: scale(1.3);
}

.plan-option input[type="radio"]:checked + .plan-details {
    color: #059669;
}

.plan-option:has(input:checked) {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.plan-name {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #059669;
    margin-bottom: 10px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 600;
}

.signup-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.signup-form .form-group:nth-child(-n+3),
.signup-form .form-group.full-width {
    grid-column: 1 / -1;
}

.btn-signup {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 18px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-signup:hover {
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .demo-modal,
    .signup-modal {
        padding: 30px 20px;
    }

    .plan-selection {
        grid-template-columns: 1fr;
    }

    .signup-form {
        grid-template-columns: 1fr;
    }

    .modal-content h2 {
        font-size: 2rem;
    }

    .brand-name {
        font-size: 1.5rem;
    }
}