*,
*::before,
*::after {
    box-sizing: border-box;
}

/* General Body & Root Styles */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --card-bg: #ffffff;
    --text-color: #333;
    --light-text-color: #666;
    --border-radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-image: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    margin: 0;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Main Container */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
    margin-bottom: 4rem; /* Added space before features */
}

/* Form & QR Containers */
.form-container,
.qr-output-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.qr-form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Input Fields */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
    font-size: 1.05rem;
}

.input-group .fab.fa-google-play {
    color: #4CAF50;
}

.input-group .fab.fa-apple {
    color: #000000;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.2);
}

/* Buttons */
.generate-btn {
    margin-top: auto; /* Pushes button to bottom */
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    background-image: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* QR Placeholder & Result */
.qr-placeholder,
.qr-result {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: all 0.3s ease-in-out;
}

.qr-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    color: white;
    text-align: center;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.qr-placeholder h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.qr-placeholder p {
    opacity: 0.7;
}

.qr-result {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    color: var(--text-color);
    flex-direction: column;
}

.qr-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
}

.qr-code {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.qr-code img,
.qr-code canvas {
    display: block;
}

.qr-info {
    width: 100%;
    margin-bottom: 1.5rem;
}

.qr-info p {
    font-size: 0.9rem;
    color: var(--light-text-color);
    margin: 0 0 1rem 0;
}

.device-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
}

.device {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.device .fab.fa-android {
    color: #3DDC84;
}

.device .fab.fa-apple {
    color: #000;
}

.qr-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-top: auto;
    align-items: stretch;
}

.download-btn,
.test-btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    line-height: 1.3;
}

.download-btn {
    background: var(--secondary-color);
    color: white;
}

.download-btn:hover {
    background: #1e63d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.test-btn {
    background-color: #e9ecef;
    color: var(--text-color);
}

.test-btn:hover {
    background-color: #dde1e4;
    transform: translateY(-2px);
}

/* Features Section */
.features {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

.features h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.feature-card .fas {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    opacity: 0.7;
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    body {
        padding: 1rem;
    }
    .main-content {
        flex-direction: column;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close, .close-download {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    transition: all 0.2s ease-in-out;
}

.close:hover,
.close-download:hover {
    color: #333;
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.test-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.test-link {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.test-link h3 {
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.test-btn-link {
    display: inline-block;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.test-btn-link:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

/* Download Modal Specific Styles */
.download-options {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.option-group {
    text-align: left;
}

.option-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
    display: block;
}

.radio-group {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.radio-group label:hover {
    background: #f8f9fa;
    border-color: #cdd5de;
}

.radio-group input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.radio-group input[type="radio"]:checked {
    border-color: #667eea;
    background-color: #667eea;
}

.radio-group input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    transform: translate(-50%, -50%);
}

.radio-group label:has(input:checked) {
    border-color: #667eea;
    background-color: #f0f2ff;
    color: #333;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success Animation */
.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

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