/* Key Converter Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1a202c;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
}

/* Navigation */
.nav {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.btn-primary-small {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.security-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Converter Section */
.converter-section {
    padding: 4rem 0;
    position: relative;
}

.converter-card {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    align-items: start;
}

.converter-input-section h2,
.converter-output-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.section-subtitle {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Input Group */
.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.key-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: border-color 0.3s;
}

.key-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-clear {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--gray-200);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all 0.3s;
}

.btn-clear:hover {
    background: var(--gray-300);
    color: var(--gray-900);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.btn-action {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    background: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Input Info */
.input-info {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    color: var(--gray-600);
    font-weight: 600;
}

.info-value {
    color: var(--primary);
    font-weight: 700;
}

/* Divider */
.converter-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.divider-line {
    width: 2px;
    flex: 1;
    background: var(--gray-200);
}

.divider-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Output Group */
.output-group {
    margin-bottom: 1.5rem;
}

.output-group:last-child {
    margin-bottom: 0;
}

.output-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.label-badge {
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.label-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.output-box {
    position: relative;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.output-box-warning {
    background: #fffbeb;
    border-color: #fbbf24;
}

.output-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--gray-700);
    word-break: break-all;
    line-height: 1.6;
}

.btn-copy {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all 0.3s;
}

.btn-copy:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.warning-text {
    margin-top: 0.5rem;
    color: #92400e;
    font-size: 0.875rem;
    font-weight: 600;
}

/* QR Code */
.qr-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    border: 2px solid var(--gray-200);
}

#qrCanvas {
    max-width: 200px;
    height: auto;
}

.btn-download {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-download:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gray-900);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Info Section */
.info-section {
    padding: 4rem 0;
    background: white;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    text-align: center;
    padding: 2rem;
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--gray-600);
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: var(--gray-50);
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: var(--gray-600);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-700);
    color: var(--gray-400);
}

/* Responsive */
@media (max-width: 968px) {
    .converter-card {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
    
    .converter-divider {
        flex-direction: row;
        height: auto;
    }
    
    .divider-line {
        width: auto;
        height: 2px;
        flex: 1;
    }
    
    .divider-icon {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }
    
    .converter-card {
        padding: 1.5rem;
    }
}