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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #055de9 0%, #3f5d87 25%, #475569 50%, #91cfb3 75%, #325f48 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated background elements */
.bg-element {
    position: absolute;
    opacity: 0.08;
    pointer-events: none;
    animation: float 20s infinite linear;
    will-change: transform;
}

.thread-pattern {
    width: clamp(100px, 25vw, 200px);
    height: clamp(100px, 25vw, 200px);
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="threads" patternUnits="userSpaceOnUse" width="10" height="10"><path d="M0,5 Q5,0 10,5 Q5,10 0,5" fill="none" stroke="white" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23threads)"/></svg>') repeat;
    top: 10%;
    left: -20%;
}

.graduation-cap {
    width: clamp(80px, 20vw, 150px);
    height: clamp(80px, 20vw, 150px);
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,20 20,35 50,50 80,35" fill="white"/><rect x="48" y="50" width="4" height="15" fill="white"/><circle cx="52" cy="67" r="3" fill="white"/></svg>') no-repeat center;
    background-size: contain;
    top: 60%;
    right: -10%;
    animation: float 15s infinite ease-in-out reverse;
}

.circuit-pattern {
    width: clamp(150px, 35vw, 300px);
    height: clamp(150px, 35vw, 300px);
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g stroke="white" stroke-width="0.3" fill="none"><path d="M10,10 L90,10 L90,30 L70,30 L70,50 L90,50 L90,70 L10,70 L10,50 L30,50 L30,30 L10,30 Z"/><circle cx="20" cy="20" r="2" fill="white"/><circle cx="80" cy="60" r="2" fill="white"/></g></svg>') repeat;
    top: 30%;
    right: -15%;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}

/* Glassmorphism container */
.container {
    max-width: min(500px, calc(100vw - 2rem));
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.registration-card {
    background: rgba(16, 185, 129, 0.18);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: 0 30px 60px rgba(16, 185, 129, 0.15);
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

.registration-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, #FC466B, rgba(255, 255, 255, 0.05), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
    will-change: transform;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.logo {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    border-radius: 20px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.3);
    position: relative;
}

.logo::before {
    content: '💡';
    font-size: clamp(1.5rem, 4vw, 2rem);
    animation: pulse 2s infinite;
}

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

.title {
    color: white;
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
    hyphens: auto;
}

.subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 400;
}

.subtitle-main {
    font-size: clamp(1rem, 3vw, 1.2em);
    margin: 0.5em 0 0.2em 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    background: linear-gradient(135deg, #14b8a6 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle-secondary {
    font-size: clamp(0.85rem, 2.2vw, 1em);
    margin: 0 0 1.5em 0;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
    width: 100%;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    max-width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #06b6d4;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-control option {
    background: #134e4a;
    color: #e0f2f1;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
}

select.form-control {
    background: rgba(255, 255, 255, 0.18);
    color: white;
    cursor: pointer;
    border: 1.5px solid #14b8a6;
    border-radius: 12px;
    padding: 1rem 2.5rem 1rem 1.25rem;
    font-size: 1.05rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.08);
    transition: border-color 0.3s, box-shadow 0.3s;
}

select.form-control:invalid {
    color: rgba(255, 255, 255, 0.6);
}

select.form-control:valid {
    color: white;
}

.gender-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    width: 100%;
}

.gender-buttons .toggle-btn {
    flex: 1;
    padding: clamp(0.8rem, 2.5vw, 1rem) clamp(1rem, 3vw, 1.25rem);
    border: 2px solid rgba(20, 184, 166, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    min-width: 0;
}

.gender-buttons .toggle-btn:hover {
    border-color: #14b8a6;
    background: rgba(20, 184, 166, 0.1);
    transform: translateY(-2px);
}

.gender-buttons .toggle-btn.active {
    background: linear-gradient(135deg, #14b8a6 0%, #0891b2 100%);
    color: white;
    border-color: #14b8a6;
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.toggle-btn {
    padding: clamp(0.7rem, 2vw, 0.8rem) clamp(1.2rem, 3vw, 1.5rem);
    margin: 0.5rem;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    width: auto;
    max-width: 100%;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.toggle-btn:active {
    transform: scale(0.96);
}

.toggle-btn.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 6px 20px rgba(14,165,233,0.4);
}

.btn-submit {
    width: 100%;
    max-width: 100%;
    padding: clamp(1rem, 3vw, 1.2rem);
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.whatsapp-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.whatsapp-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: clamp(0.8rem, 2.5vw, 1rem) clamp(1.5rem, 4vw, 2rem);
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: clamp(0.9rem, 2.3vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
    max-width: 100%;
    word-wrap: break-word;
}

.btn-whatsapp:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 40px rgba(37, 211, 102, 0.4);
}

.whatsapp-icon {
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12.04 2c-5.46 0-9.91 4.45-9.91 9.91 0 1.75.46 3.45 1.32 4.95L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21 5.46 0 9.91-4.45 9.91-9.91S17.5 2 12.04 2zm4.52 7.01l-2.21 5.23c-.22.52-.82.78-1.39.59-.49-.17-1.04-.37-1.84-.78-2.22-1.14-3.65-3.44-3.76-3.6-.11-.16-.89-1.18-.89-2.26 0-1.07.56-1.6.76-1.82.2-.22.43-.28.57-.28.14 0 .28 0 .41.01.13.01.3-.05.47.36.18.41.61 1.49.66 1.6.05.11.09.24.02.39-.07.15-.11.24-.22.37-.11.13-.23.29-.33.39-.11.1-.22.21-.1.41.12.2.54.89 1.16 1.44.8.71 1.47.93 1.67 1.04.2.11.32.09.43-.05.11-.15.5-.58.63-.78.13-.2.27-.17.45-.1.18.07 1.17.55 1.37.65.2.1.33.15.38.23.05.08.05.5-.12 1.01z"/></svg>') no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-message {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    display: none;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    word-wrap: break-word;
}

/* Success Page Styles */
.success-page {
    display: none;
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 100%;
}

.success-page.show {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

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

.success-icon::before {
    content: '✓';
    font-size: clamp(2.5rem, 7vw, 3rem);
    color: white;
    font-weight: bold;
}

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

.success-title {
    color: white;
    font-size: clamp(2rem, 6vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
    hyphens: auto;
}

.success-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.success-message {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    line-height: 1.7;
    word-wrap: break-word;
}

.event-promo {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(8, 145, 178, 0.2) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 20px;
    padding: clamp(2rem, 5vw, 2.5rem) clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.event-promo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(6, 182, 212, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 4s infinite;
    will-change: transform;
}

.event-title {
    color: white;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
    word-wrap: break-word;
    hyphens: auto;
}

.event-date {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: clamp(0.4rem, 1.5vw, 0.5rem) clamp(1rem, 3vw, 1.5rem);
    border-radius: 25px;
    display: inline-block;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.3);
    max-width: 100%;
    word-wrap: break-word;
}

.event-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    margin-bottom: 2rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.btn-profsummit {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: clamp(1rem, 3vw, 1.2rem) clamp(2rem, 5vw, 2.5rem);
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 20px 40px rgba(30, 41, 59, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    max-width: 100%;
    word-wrap: break-word;
}

.btn-profsummit:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 25px 50px rgba(30, 41, 59, 0.6);
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

.profsummit-icon {
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>') no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

.back-btn {
    position: absolute;
    top: clamp(1rem, 3vw, 1.5rem);
    left: clamp(1rem, 3vw, 1.5rem);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: clamp(0.6rem, 2vw, 0.75rem) clamp(1rem, 3vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    z-index: 10;
    backdrop-filter: blur(10px);
    font-weight: 500;
    max-width: calc(100vw - 2rem);
    word-wrap: break-word;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0.5rem;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 1rem;
    }
    
    .registration-card {
        padding: 1.5rem 1rem;
        border-radius: 20px;
        margin: 0;
        min-height: auto;
    }
    
    .header {
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-control {
        padding: 0.8rem 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .gender-buttons {
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .gender-buttons .toggle-btn {
        padding: 0.8rem 0.5rem;
        font-size: 0.8rem;
        min-width: 0;
        flex: 1;
    }
    
    .btn-submit {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .btn-whatsapp {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .success-page {
        padding-top: 0;
    }
    
    .event-promo {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    
    .back-btn {
        position: static;
        margin-bottom: 1rem;
        display: inline-block;
        width: auto;
    }
    
    .bg-element {
        opacity: 0.04;
    }
    
    .thread-pattern,
    .graduation-cap,
    .circuit-pattern {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.25rem;
    }
    
    .registration-card {
        padding: 1rem 0.75rem;
        border-radius: 16px;
    }
    
    .form-control {
        padding: 0.7rem 0.8rem;
    }
    
    .gender-buttons {
        gap: 6px;
    }
    
    .gender-buttons .toggle-btn {
        padding: 0.7rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .event-promo {
        padding: 1rem 0.75rem;
    }
    
    .bg-element {
        display: none; /* Hide background elements on very small screens */
    }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        align-items: flex-start;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .registration-card {
        padding: 1rem;
    }
    
    .header {
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 0.8rem 1rem;
    }
    
    .gender-buttons {
        gap: 8px;
    }
    
    .gender-buttons .toggle-btn {
        padding: 0.8rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .btn-submit {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .btn-whatsapp {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .event-promo {
        padding: 1rem;
    }
}