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

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Dark mode desteği (devre dışı bırakıldı - her zaman light mode) */

/* Header Section */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-section h1 {
    margin-bottom: 0;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #374151;
    color: white;
    border: 2px solid #4b5563;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.dark-mode-toggle:hover {
    background: #4b5563;
    border-color: #6b7280;
    transform: translateY(-2px);
}

.dark-mode-toggle .toggle-icon {
    font-size: 16px;
}

/* Dark Mode Active Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.dark-mode .edit-panel {
    background: #2d2d2d;
    color: #ffffff;
    border: 1px solid #404040;
}

body.dark-mode .edit-panel h2 {
    color: #ffffff;
}

body.dark-mode .form-group label {
    color: #e0e0e0;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background: #3d3d3d;
    border-color: #555;
    color: #ffffff;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #3b82f6;
    background: #4d4d4d;
}

body.dark-mode .preview-section,
body.dark-mode .html-output-section {
    background: #2d2d2d;
    color: #ffffff;
    border: 1px solid #404040;
}

body.dark-mode .preview-section h2,
body.dark-mode .html-output-section h2 {
    color: #ffffff;
}

body.dark-mode .signature-preview {
    background: #2d2d2d;
    border-color: #555;
}

body.dark-mode #htmlOutput {
    background: #3d3d3d;
    border-color: #555;
    color: #ffffff;
}

body.dark-mode .dark-mode-toggle {
    background: #3b82f6;
    border-color: #3b82f6;
}

body.dark-mode .dark-mode-toggle:hover {
    background: #2563eb;
    border-color: #2563eb;
}

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

h1 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ffffff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    color: #1e3a8a;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

/* Düzenleme Paneli */
.edit-panel {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.edit-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 15px;
}

.form-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

.form-group input,
.form-group textarea {
    padding: 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
}


.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.button-group button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.button-group button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.button-group button:hover::before {
    left: 100%;
}

.button-group button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.button-group button:nth-child(2) {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.button-group button:nth-child(3) {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.button-group button:nth-child(4) {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.button-group button:nth-child(5) {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Önizleme Bölümü */
.preview-section {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.preview-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.signature-preview {
    border: 2px dashed #d1d5db;
    border-radius: 15px;
    padding: 30px;
    min-height: 200px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    user-select: text;
    cursor: pointer;
}

.signature-preview:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.signature-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.05) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.signature-preview:hover::before {
    opacity: 1;
}

.signature-preview table {
    margin: 0 auto;
    width: 100% !important;
    max-width: 540px !important;
}

/* HTML Çıktı Bölümü */
.html-output-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.html-output-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

#htmlOutput {
    width: 100%;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    resize: vertical;
    transition: all 0.3s ease;
}

#htmlOutput:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

/* Mail İmza Tasarımı */
.email-signature {
    max-width: 600px;
    font-family: 'Poppins', Arial, sans-serif;
    line-height: 1.4;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Dark mode için email signature preview optimizasyonu */
body.dark-mode .signature-preview {
    background: #1a1a1a;
    border-color: #404040;
}

body.dark-mode .signature-preview table {
    background: #1a1a1a;
}

/* Dark mode'da email signature içindeki metinler için daha iyi kontrast */
body.dark-mode .signature-preview h3,
body.dark-mode .signature-preview .title,
body.dark-mode .signature-preview a {
    color: #ffffff !important;
}

body.dark-mode .signature-preview .contact-item a {
    color: #ffffff !important;
}

/* Dark mode'da email signature tablosu için daha iyi görünüm */
body.dark-mode .signature-preview table td {
    background: #1a1a1a !important;
}

body.dark-mode .signature-preview table td[style*="background: white"] {
    background: #2d2d2d !important;
}

body.dark-mode .signature-preview table td[style*="background: #1e3a8a"] {
    background: #1e3a8a !important;
}

/* Dark mode'da link renkleri için daha iyi kontrast */
body.dark-mode .signature-preview a[style*="color: #1e3a8a"] {
    color: #ffffff !important;
}

body.dark-mode .signature-preview a[style*="color: white"] {
    color: #ffffff !important;
}

/* Dark mode'da email signature için ek optimizasyonlar */
body.dark-mode .signature-preview {
    position: relative;
}

body.dark-mode .signature-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
    border-radius: 8px;
}

/* Dark mode'da form elemanları için daha iyi görünüm */
body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
    color: #9ca3af;
}

/* Dark mode'da butonlar için daha iyi hover efektleri */
body.dark-mode .button-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Dark mode'da signature preview için daha iyi border */
body.dark-mode .signature-preview {
    border: 2px dashed #4b5563;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
}

/* Mail İmza Önizleme Stilleri */
.signature-preview {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    background: #fafafa;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.signature-preview table {
    margin: 0;
}

/* Email signature logo hizalama için özel CSS */
.signature-preview table td[style*="width: 30%"] {
    text-align: right !important;
}

.signature-preview table td[style*="width: 30%"] div {
    text-align: right !important;
}

/* Gmail ve webmail için özel logo hizalama */
.signature-preview table td[style*="text-align: right"] {
    text-align: right !important;
}

.signature-preview table td[style*="text-align: right"] div {
    text-align: right !important;
}

.signature-preview table td[style*="text-align: right"] img {
    display: inline-block !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* SVG ikonlar için özel stiller */
.signature-preview svg {
    vertical-align: middle;
}

/* Su damlası logo için özel stiller */
.signature-preview .logo-container svg {
    display: block;
    margin: 0 auto;
}

/* Sosyal medya ikonları için hover efektleri */
.signature-preview .social-links a:hover svg {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}



.signature-header {
    background: white;
    color: #1e3a8a;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.personal-info {
    flex: 1;
}

.personal-info h3 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1e3a8a;
}

.personal-info .title {
    font-size: 14px;
    margin-bottom: 4px;
    color: #1e3a8a;
    font-weight: 500;
}

.company-logo-section {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
}

.company-name-text {
    font-size: 24px;
    font-weight: 700;
    color: #1e3a8a;
    text-transform: lowercase;
}

.company-slogan {
    font-size: 10px;
    color: #00aaff;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.company-name-text {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a8a;
    text-transform: lowercase;
}

.company-slogan {
    font-size: 10px;
    color: #00aaff;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.contact-section {
    background: white;
    padding: 20px 25px;
    border-top: 1px solid #cccccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e3a8a;
    font-size: 14px;
}

.contact-item a {
    color: #1e3a8a;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.signature-footer {
    background: #1e3a8a;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.footer-left a {
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.footer-left a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-links a {
    display: inline-block;
    width: 24px;
    height: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.1);
}

/* Footer telefon ikonu hizalama düzeltmesi */
.signature-preview img[alt="Telefon"] {
    vertical-align: middle !important;
}

.social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.social-divider {
    width: 1px;
    height: 20px;
    background: white;
    opacity: 0.3;
}

/* Konum ikonunu göster (gizleme kuralı kaldırıldı) */

/* Responsive Tasarım */
@media (max-width: 768px) {
    /* Masaüstünü bozmadan LinkedIn için sadece mobilde satır kır */
    .signature-preview .mobile-only-break {
        display: inline !important;
    }
    /* Sosyal ikonları satır kıracak şekilde düzenle */
    .signature-preview td.social-links {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-end !important;
        white-space: normal !important;
        gap: 8px !important;
    }
    .signature-preview td.social-links a {
        flex: 0 0 auto !important; /* 2'li yan yana tut */
        display: inline-flex !important;
        align-items: center !important;
    }

    /* YouTube ve Konum ilk satırda kalsın */
    .signature-preview td.social-links a[title="YouTube"],
    .signature-preview td.social-links a[title="Konum"] {
        order: 1 !important;
    }

    /* Satır kırma elemanı: ilk satırdan sonra */
    .signature-preview .mobile-only-break {
        display: block !important; /* flex item olsun */
        order: 2 !important;
        flex: 0 0 100% !important; /* yeni satıra geç */
        width: 100% !important;
        height: 0 !important;
        line-height: 0 !important;
    }

    /* LinkedIn ve Instagram ikinci satırda yan yana */
    .signature-preview td.social-links a[title="LinkedIn"],
    .signature-preview td.social-links a[title="Instagram"] {
        order: 3 !important;
        width: auto !important;
        text-align: right !important;
    }
    .container {
        padding: 15px;
    }
    
    .signature-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .company-info {
        text-align: left;
    }
    
    .signature-footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .button-group {
        justify-content: center;
    }
    
    .button-group button {
        flex: 1;
        min-width: 120px;
    }
    
    /* Mobilde table genişliği: konteyneri doldur, maksimum 460px */
    .signature-preview table {
        width: 100% !important;
        max-width: 460px !important;
        margin: 0 auto !important;
    }
    
    /* Mobilde telefon ve email alt alta - SÜPER GÜÇLÜ */
    .signature-preview table tr:nth-child(2) table {
        width: 100% !important;
        table-layout: fixed !important;
    }
    
    .signature-preview table tr:nth-child(2) table tr {
        display: block !important;
        width: 100% !important;
    }
    
    .signature-preview table tr:nth-child(2) table td {
        width: 100% !important;
        display: block !important;
        margin-bottom: 8px !important;
        padding: 4px 0 !important;
        float: none !important;
        clear: both !important;
        position: static !important;
    }
    
    .signature-preview table tr:nth-child(2) table td:last-child {
        margin-bottom: 0 !important;
    }
    
    /* İkon ve metin yan yana - ZORLA */
    .signature-preview table tr:nth-child(2) table td img {
        display: inline-block !important;
        vertical-align: middle !important;
        margin-right: 6px !important;
        float: none !important;
    }
    
    .signature-preview table tr:nth-child(2) table td a {
        display: inline-block !important;
        vertical-align: middle !important;
        float: none !important;
        white-space: nowrap !important;
    }
    /* Mobilde footer satırının tek satır kalması ve taşmaması için */
    .signature-preview a[href^="tel:"] {
        white-space: nowrap !important;
    }
    
    /* Tüm table elementlerini zorla düzelt */
    .signature-preview table tr:nth-child(2) table * {
        box-sizing: border-box !important;
    }

    /* Mobilde sosyal ikon boyutları */
    .social-links a {
        width: 20px !important;
        height: 20px !important;
    }

    .social-icon {
        width: 20px !important;
        height: 20px !important;
    }

    /* Gmail inline width/height ve SVG özniteliklerini zorla geçersiz kıl */
    .signature-preview .social-links img,
    .signature-preview .social-links svg {
        width: 20px !important;
        height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
    }

    /* Olası inline style değerlerini hedefle (Gmail) */
    .signature-preview .social-links a[style*="width: 32px"],
    .signature-preview .social-links a[style*="height: 32px"] {
        width: 20px !important;
        height: 20px !important;
    }

    /* Sosyal linkler arası boşluğu azalt ve satır kaymasını engelle */
    .social-links {
        gap: 8px !important;
        white-space: nowrap !important;
    }

    /* Footer tek satırda kalmaya çalışsın */
    .signature-footer {
        flex-wrap: nowrap !important;
    }

    /* Konum/telefon/e-posta ikonlarını da küçült (Gmail için) */
    .contact-icon,
    .signature-preview .contact-item img,
    .signature-preview .contact-item svg {
        width: 20px !important;
        height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
        vertical-align: middle !important;
    }
}

