/**
 * Sitene Ekle - Embed Page Styles
 * Modern webmaster-focused design
 */

/* Page Layout */
.sec-embed-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #334155;
    background: #f8fafc;
    min-height: 60vh;
}

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

/* Page Header — Dark developer style */
.sec-page-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 48px 40px;
    margin: 0 -20px 48px;
    position: relative;
    overflow: hidden;
}

.sec-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 20px 20px;
}

.sec-page-header::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
    top: -150px;
    right: -50px;
}

.sec-page-header > * {
    position: relative;
    z-index: 1;
}

.sec-page-header .container {
    max-width: 1200px;
    margin: 0 auto;
}

.sec-page-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.sec-page-subtitle {
    font-size: 1rem;
    opacity: 0.6;
    margin: 0;
    font-weight: 400;
}

.sec-webmaster-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 16px;
}

/* Widget Grid */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
}

/* Widget Card */
.widget-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.widget-header {
    padding: 24px 24px 16px;
}

.widget-title {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.widget-description {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}

/* Widget Preview */
.widget-preview {
    padding: 20px 24px;
    background: #f8fafc;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

/* Widget Controls */
.widget-controls {
    padding: 20px 24px;
}

.widget-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.option-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #334155;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.option-group select:focus {
    outline: none;
    border-color: #2563eb;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.checkbox-group label {
    margin: 0;
    text-transform: none;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #0f172a;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1e293b;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Webmaster Info Box */
.sec-webmaster-info {
    background: transparent;
    border: none;
    border-top: 1px solid #e2e8f0;
    border-radius: 0;
    padding: 32px 0 0;
    margin-top: 32px;
}

.sec-webmaster-info h3 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sec-webmaster-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.sec-webmaster-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #475569;
    padding: 0;
    background: none;
    border-radius: 0;
}

.sec-webmaster-info li::before {
    content: none;
}

.webmaster-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #f0fdf4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #16a34a;
}

/* Code Modal */
.code-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

.code-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.code-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.close-modal {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.close-modal:hover {
    background: #e2e8f0;
}

.code-modal-body {
    padding: 24px;
}

.code-modal-body > p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #64748b;
}

.code-textarea {
    width: 100%;
    height: 280px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    resize: none;
    background: #0f172a;
    color: #e2e8f0;
    margin-bottom: 12px;
}

.copy-success {
    color: #16a34a;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    display: none;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .sec-page-header {
        padding: 36px 24px;
        margin: 0 -20px 32px;
    }

    .sec-page-title {
        font-size: 1.5rem;
    }

    .widgets-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .sec-webmaster-info ul {
        grid-template-columns: 1fr;
    }
}
