@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;600;700&family=Unna:ital@0;1&display=swap');

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

body {
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #403F44 0%, #0071BC 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.logo {
    display: block;
    max-width: 180px;
    height: auto;
    margin: 0 auto 30px;
}

h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #53B7E8;
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #53B7E8 0%, #0071BC 100%);
    color: white;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(83, 183, 232, 0.4);
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    margin-top: 20px;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.error-message {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

/* Success page styles */
.success-header {
    text-align: center;
    margin-bottom: 20px;
}

.checkmark {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: block;
}

.checkmark-circle {
    stroke: #4caf50;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke: #4caf50;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.success-header h2 {
    color: #333;
    font-size: 24px;
}

.success-message {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.wifi-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.wifi-section h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

.wifi-name {
    color: #53B7E8;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 20px;
}

.instruction {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.qr-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#qr-code {
    display: block;
    max-width: 250px;
    width: 100%;
    height: auto;
}

.help-text {
    color: #999;
    font-size: 13px;
    margin-top: 15px;
    font-style: italic;
}

/* Modal popup styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.modal-content h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
}

.modal-message {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-btn {
    margin-top: 10px;
}

/* Responsive design */
@media (max-width: 600px) {
    .card {
        padding: 30px 20px;
    }

    .logo {
        max-width: 140px;
        margin-bottom: 20px;
    }

    h1 {
        font-size: 24px;
    }

    #qr-code {
        max-width: 200px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-icon {
        font-size: 48px;
    }

    .modal-content h2 {
        font-size: 20px;
    }

    .modal-message {
        font-size: 14px;
    }
}
