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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    text-align: center;
    color: white;
    font-size: 42px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.subtitle {
    text-align: center;
    color: rgba(255,255,255,0.9);
    font-size: 18px;
    margin-bottom: 40px;
}

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

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

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

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-generate {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

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

.result-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.result-container h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f5f5f5;
    padding: 5px;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s;
}

.radio-label:hover {
    border-color: #667eea;
    background: #f9fafb;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #eef2ff;
}

/* QR Images */
#qrImages {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.qr-image-item {
    text-align: center;
}

.qr-image-item h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.qr-image-item img {
    max-width: 100%;
    width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

#downloadButtons {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-download,
.btn-reset {
    padding: 15px 30px;
    margin: 10px 5px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-download {
    background: #10b981;
    color: white;
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-reset {
    background: #6b7280;
    color: white;
}

.btn-reset:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.telegram-info {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.telegram-info h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 22px;
}

.telegram-info p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-telegram {
    display: inline-block;
    padding: 15px 30px;
    background: #0088cc;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-telegram:hover {
    background: #006699;
    transform: translateY(-2px);
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

@media (max-width: 640px) {
    h1 {
        font-size: 32px;
    }
    
    .form-container,
    .result-container {
        padding: 25px;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .radio-label {
        width: 100%;
    }
    
    #downloadButtons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-download,
    .btn-reset {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}
