/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Performance Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Critical CSS - Above the fold content */
.header, .converter-card {
    will-change: transform;
}

/* Reduce layout shifts */
.logo i, .format-card i, .info-card i {
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 3rem;
    color: #fff;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.logo h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.logo h1 a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo h1 a:hover {
    color: #f8f9fa;
    text-shadow: 0 6px 12px rgba(0,0,0,0.4);
    transform: scale(1.02);
}

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

/* Main Content */
.main-content {
    display: grid;
    gap: 30px;
}

/* Converter Card */
.converter-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.card-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-header p {
    opacity: 0.9;
    font-size: 1rem;
}

/* Form Styles */
.converter-form {
    padding: 40px;
}

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

/* Grid System */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.col-6 {
    flex: 0 0 calc(50% - 10px);
}

.col-3 {
    flex: 0 0 calc(50% - 5px);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group i {
    color: #667eea;
}

input[type="url"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

input[type="url"]:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* URL Validation */
.url-validation {
    margin-top: 8px;
    font-size: 0.9rem;
    min-height: 20px;
}

.url-validation.valid {
    color: #22c55e;
}

.url-validation.invalid {
    color: #ef4444;
}

/* Format Options */
.format-options {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 10px;
}

.format-option {
    cursor: pointer;
}

.format-option input[type="radio"] {
    display: none;
}

.format-card {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    gap: 15px;
}

.format-card i {
    font-size: 2rem;
    color: #667eea;
    flex-shrink: 0;
}

.format-card .format-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.format-card strong {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.2;
}

.format-card small {
    color: #666;
    line-height: 1.2;
}

.format-option input[type="radio"]:checked + .format-card {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

/* Checkbox */
.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: 400 !important;
}

.checkbox-label input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Buttons */
.convert-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.3);
}

.convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Progress Section */
.progress-section {
    padding: 40px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-title {
    font-weight: 600;
    color: #333;
}

.progress-percentage {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.progress-bar {
    height: 12px;
    background: #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 6px;
}

.job-id {
    text-align: center;
    color: #666;
}

/* Result Section */
.result-section,
.error-section {
    padding: 40px;
    text-align: center;
}

.result-success i,
.result-error i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-success i {
    color: #22c55e;
}

.result-error i {
    color: #ef4444;
}

.result-success h3,
.result-error h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.result-success p,
.result-error p {
    color: #666;
    margin-bottom: 25px;
}

.download-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
    min-width: 200px;
    height: 56px;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.4);
}

.download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.download-btn i {
    font-size: 1.2rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    line-height: 1;
}

.download-btn span {
    font-weight: 600;
    color: #fff;
    line-height: 1;
    display: flex;
    align-items: center;
}

.download-btn:disabled i,
.download-btn:disabled span {
    color: #fff !important;
}

.retry-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #667eea;
    color: #fff;
}

.retry-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

/* Description Card */
.description-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 30px;
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
}

.description-card h2 {
    color: #1a202c;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.description-card p {
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.description-card p:last-child {
    margin-bottom: 0;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.info-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.info-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.info-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid #22c55e;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.warning {
    border-left: 4px solid #f59e0b;
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: #22c55e;
}

.toast.error i {
    color: #ef4444;
}

.toast.warning i {
    color: #f59e0b;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Info Note */
.info-note {
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 4px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-note i {
    color: #667eea;
    font-size: 1rem;
}

.info-note small {
    color: #555;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .converter-form {
        padding: 30px 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .col-6 {
        flex: 1;
    }
    
    .format-options {
        gap: 6px;
    }
    
    .description-card {
        padding: 30px 20px;
        margin-top: 40px;
        margin-bottom: 30px;
    }
    
    .description-card h2 {
        font-size: 1.5rem;
    }
    
    .description-card p {
        font-size: 1rem;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .toast {
        max-width: calc(100vw - 40px);
    }
}

/* Terms of Use Sayfası Stilleri */
.terms-main {
    flex: 1;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: calc(100vh - 160px);
}

.terms-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.terms-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.terms-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.terms-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.terms-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.terms-content {
    line-height: 1.8;
    color: #34495e;
}

.terms-section {
    margin-bottom: 30px;
}

.terms-section h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.terms-section h3 {
    color: #34495e;
    font-size: 1.3rem;
    margin: 25px 0 15px 0;
}

.terms-section p {
    margin-bottom: 15px;
    text-align: justify;
}

.terms-section ul {
    margin: 15px 0;
    padding-left: 30px;
}

.terms-section li {
    margin-bottom: 8px;
}

.terms-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin: 30px 0;
}

.terms-placeholder i {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 15px;
}

.terms-placeholder h3 {
    color: #495057;
    margin-bottom: 10px;
}

.terms-placeholder p {
    color: #6c757d;
    margin: 0;
}

.terms-actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.btn-back i {
    font-size: 1rem;
}

/* Terms Sayfası Footer */
.footer .footer-links a.active {
    color: #667eea;
    font-weight: 600;
}

/* Responsive Terms */
@media (max-width: 768px) {
    .terms-main {
        padding: 20px 15px;
    }
    
    .terms-container {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .terms-header h1 {
        font-size: 2rem;
    }
    
    .terms-header i {
        font-size: 2.5rem;
    }
    
    .terms-section h2 {
        font-size: 1.5rem;
    }
    
    .terms-placeholder {
        padding: 25px 15px;
    }
    
    .terms-placeholder i {
        font-size: 2rem;
    }
}

/* Contact Form Stilleri */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #e1e5e9;
}

.contact-form .form-group {
    margin-bottom: 25px;
}

.contact-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.contact-form label i {
    color: #667eea;
    font-size: 1rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="number"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.security-challenge {
    background: rgba(102, 126, 234, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.math-challenge {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.math-challenge span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    min-width: 80px;
}

.math-challenge input {
    max-width: 150px;
    min-width: 120px;
}

.contact-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.contact-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.contact-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.contact-submit-btn i {
    font-size: 1rem;
}

.contact-success {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #22c55e;
    border-radius: 15px;
    margin-top: 20px;
}

.contact-success i {
    font-size: 3rem;
    color: #22c55e;
    margin-bottom: 15px;
}

.contact-success h3 {
    color: #155724;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.contact-success p {
    color: #155724;
    margin: 0;
    text-align: center;
}

/* Contact Form Responsive */
@media (max-width: 768px) {
    .contact-form {
        padding: 25px 20px;
    }
    
    .math-challenge {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .math-challenge input {
        max-width: 200px;
        min-width: 150px;
    }
}
