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

:root {
    --primary-color: #ff0000;
    --primary-dark: #cc0000;
    --secondary-color: #1a1a1a;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --error-color: #f44336;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-image {
    max-height: 80px;
    height: 80px;
    width: auto;
    min-width: 100px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 300;
}

.converter-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-hover);
    margin-bottom: 30px;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.card-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.converter-form {
    margin-top: 30px;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.input-group input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.input-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

.format-selector {
    margin-bottom: 30px;
}

.format-selector label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: white;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: var(--primary-color);
}

.radio-label {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.radio-label strong {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.radio-label small {
    font-size: 0.85rem;
    color: var(--text-light);
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(255, 0, 0, 0.05);
}

.convert-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    position: relative;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.convert-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-area,
.error-area {
    margin-top: 30px;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.success-message {
    background: rgba(76, 175, 80, 0.1);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid var(--success-color);
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    font-weight: bold;
}

.success-message h3 {
    color: var(--success-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.download-btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--success-color);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    margin-bottom: 15px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.new-conversion-btn,
.retry-btn {
    display: block;
    margin: 15px auto 0;
    padding: 12px 30px;
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-conversion-btn:hover,
.retry-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255, 0, 0, 0.05);
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid var(--error-color);
}

.error-icon {
    width: 60px;
    height: 60px;
    background: var(--error-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    font-weight: bold;
}

.error-message h3 {
    color: var(--error-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.info-section,
.features {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.info-section h3,
.features h3 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.instructions {
    list-style: none;
    counter-reset: step-counter;
    padding-left: 0;
}

.instructions li {
    counter-increment: step-counter;
    margin-bottom: 20px;
    padding-left: 50px;
    position: relative;
    color: var(--text-color);
}

.instructions li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    text-align: center;
    padding: 20px;
    background: #fafafa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.feature-card h4 {
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.9);
}

footer p {
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 0.85rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    .logo {
        flex-direction: column;
        gap: 15px;
    }
    .logo-image {
        max-height: 60px;
    }
    .logo h1 {
        font-size: 2rem;
    }
    .converter-card {
        padding: 25px;
    }
    .radio-group {
        grid-template-columns: 1fr;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    .logo-image {
        max-height: 50px;
    }
    .logo h1 {
        font-size: 1.5rem;
    }
    .converter-card {
        padding: 20px;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
}

