/* Reset ve temel stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 60px;
    padding: 60px 0;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

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

.logo i {
    font-size: 3rem;
    color: #6366f1;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
}

.logo h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0;
}

.subtitle {
    font-size: 1.25rem;
    color: #9ca3af;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Ana içerik */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Editör bölümü */
.editor-section {
    background: #111111;
    border-radius: 24px;
    padding: 32px;
    border: 1px solid #1f1f1f;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.editor-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #6366f1, transparent);
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.editor-header h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.editor-actions {
    display: flex;
    gap: 10px;
}

.editor-container {
    position: relative;
}

#markdownEditor {
    width: 100%;
    min-height: 500px;
    background: #0a0a0a;
    border: 1px solid #1f1f1f;
    border-radius: 16px;
    padding: 24px;
    color: #ffffff;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
    font-weight: 400;
    scrollbar-width: thin;
    scrollbar-color: #6366f1 #1f1f1f;
}

#markdownEditor:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Webkit scrollbar stilleri */
#markdownEditor::-webkit-scrollbar {
    width: 8px;
}

#markdownEditor::-webkit-scrollbar-track {
    background: #1f1f1f;
    border-radius: 4px;
}

#markdownEditor::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 4px;
    transition: background 0.2s ease;
}

#markdownEditor::-webkit-scrollbar-thumb:hover {
    background: #5855eb;
}

#markdownEditor::placeholder {
    color: #888;
    font-style: italic;
}

/* Önizleme bölümü */
.preview-section {
    background: #111111;
    border-radius: 24px;
    padding: 32px;
    border: 1px solid #1f1f1f;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.preview-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #6366f1, transparent);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.preview-header h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-content {
    background: #0a0a0a;
    border-radius: 16px;
    padding: 32px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #1f1f1f;
    line-height: 1.7;
    scrollbar-width: thin;
    scrollbar-color: #6366f1 #1f1f1f;
}

/* Preview content scrollbar stilleri */
.preview-content::-webkit-scrollbar {
    width: 8px;
}

.preview-content::-webkit-scrollbar-track {
    background: #1f1f1f;
    border-radius: 4px;
}

.preview-content::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.preview-content::-webkit-scrollbar-thumb:hover {
    background: #5855eb;
}

/* Butonlar */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #6366f1;
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: #5855eb;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary {
    background: #1f1f1f;
    color: #ffffff;
    border: 1px solid #2a2a2a;
}

.btn-secondary:hover {
    background: #2a2a2a;
    border-color: #3a3a3a;
    transform: translateY(-1px);
}

/* Sonuç bölümü */
.result-section {
    margin-bottom: 60px;
}

.result-card {
    background: #111111;
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    border: 1px solid #1f1f1f;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
}

.success-icon {
    font-size: 5rem;
    color: #10b981;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.3));
}

.result-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.result-card p {
    font-size: 1.125rem;
    color: #9ca3af;
    margin-bottom: 32px;
    line-height: 1.6;
}

.share-link {
    margin-bottom: 30px;
}

.share-link label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #e0e0e0;
}

.link-container {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.link-container input {
    flex: 1;
    padding: 16px 20px;
    background: #0a0a0a;
    border: 1px solid #1f1f1f;
    border-radius: 12px;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    transition: all 0.2s ease;
}

.link-container input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(79, 195, 247, 0.3);
    border-top: 4px solid #4fc3f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #4fc3f7;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Markdown içerik stilleri */
.preview-content h1,
.preview-content h2,
.preview-content h3,
.preview-content h4,
.preview-content h5,
.preview-content h6 {
    color: #6366f1;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.preview-content h1 {
    font-size: 2.5em;
    border-bottom: 3px solid rgba(99, 102, 241, 0.3);
    padding-bottom: 0.3em;
}

.preview-content h2 {
    font-size: 2em;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
    padding-bottom: 0.3em;
}

.preview-content h3 {
    font-size: 1.5em;
}

.preview-content h4 {
    font-size: 1.3em;
}

.preview-content h5 {
    font-size: 1.1em;
}

.preview-content h6 {
    font-size: 1em;
    color: #9ca3af;
}

.preview-content p {
    margin-bottom: 1em;
    font-size: 1.1em;
    line-height: 1.7;
}

.preview-content strong {
    color: #ffeb3b;
    font-weight: 600;
}

.preview-content em {
    color: #81c784;
    font-style: italic;
}

.preview-content code {
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    color: #ffeb3b;
    font-size: 0.9em;
    border: 1px solid rgba(255, 235, 59, 0.2);
}

.preview-content pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1.5em 0;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.preview-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    border: none;
    font-size: 0.9em;
    line-height: 1.4;
}

.preview-content blockquote {
    border-left: 4px solid #6366f1;
    padding: 15px 20px;
    margin: 1.5em 0;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0 8px 8px 0;
    color: #9ca3af;
    font-style: italic;
}

.preview-content blockquote p {
    margin-bottom: 0;
}

.preview-content ul,
.preview-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.preview-content li {
    margin-bottom: 0.5em;
    font-size: 1.1em;
}

.preview-content ul li {
    list-style-type: none;
    position: relative;
}

.preview-content ul li::before {
    content: "▶";
    color: #6366f1;
    position: absolute;
    left: -1.5em;
    font-size: 0.8em;
}

.preview-content ol {
    counter-reset: list-counter;
}

.preview-content ol li {
    counter-increment: list-counter;
    position: relative;
}

.preview-content ol li::before {
    content: counter(list-counter) ".";
    color: #6366f1;
    position: absolute;
    left: -2em;
    font-weight: 600;
}

.preview-content a {
    color: #6366f1;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.preview-content a:hover {
    color: #5855eb;
    border-bottom-color: #5855eb;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.preview-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.preview-content th,
.preview-content td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

.preview-content th {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.preview-content td {
    color: #e0e0e0;
}

.preview-content tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.preview-content tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.preview-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #6366f1, transparent);
    margin: 2em 0;
}

.preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin: 1em 0;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .editor-actions {
        justify-content: center;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 0;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .editor-section,
    .preview-section,
    .result-card {
        padding: 20px;
    }
}
