/* latin-ext */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../webfonts/outfit/outfit-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../webfonts/outfit/outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* style.css */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
}

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

body,
input,
button,
select,
textarea {
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.9rem;
}

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

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary-color), #00c6ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 25px;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.category-section {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.category-header {
    background-color: #fff;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
}

.link-list {
    list-style: none;
}

.link-item {
    border-bottom: 1px solid var(--border-color);
}

.link-item:last-child {
    border-bottom: none;
}

.link-item a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.2s;
}

.link-item a:hover {
    background-color: #f1f3f5;
    color: var(--primary-color);
}

.link-title {
    font-weight: 500;
    display: block;
}

.link-desc {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 5px;
    display: block;
}

/* Admin Styles */
.admin-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    height: 38px;
    display: block;
    line-height: normal;
}

.form-control-sm {
    height: 32px;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
    text-align: center;
    min-width: 100px;
    /* Biraz küçültüldü */
    height: 38px;
    /* Daha standart yükseklik */
    box-sizing: border-box;
    vertical-align: middle;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0 15px;
    font-size: 0.85rem;
    min-width: auto;
    height: 32px;
    line-height: 32px;
}

.btn-action {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-action i {
    margin: 0;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.admin-nav {
    background: white;
    padding: 15px 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    display: inline-block;
    width: 100%;
}

.admin-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.admin-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background-color: #f1f3f5;
    color: var(--primary-color);
    text-decoration: none;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    border: 1px solid #eee;
}

th,
td {
    border: 1px solid #eee;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f1f3f5;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 8px;
    color: #fff;
    background-color: var(--secondary-color);
}

.click-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background-color: #727d85;
    transition: all 0.2s;
    border: none;
}

.click-badge.dark {
    background-color: #727d85;
    color: #fff;
    border: none;
}

.copy-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #727d85;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.copy-btn:hover {
    background-color: #5a636a;
    transform: translateY(-1px);
}

.copy-btn i {
    opacity: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 5px;
        /* Minimal padding to use full width */
        width: 100%;
    }

    header {
        margin-bottom: 20px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    /* Stack Top Bar elements */
    .top-bar {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }

    /* Stack Admin Nav items */
    .admin-nav {
        padding: 15px;
        border-radius: 15px;
        /* Reduce radius for mobile */
    }

    .admin-nav ul {
        flex-direction: column;
        gap: 5px;
    }

    .admin-nav a {
        display: block;
        width: 100%;
        text-align: center;
        background-color: #f8f9fa;
        /* Light background for clearer separate items */
    }

    /* Make tables scrollable */
    /* Make tables scrollable */
    .category-section table,
    .link-table {
        /* display: block; Removed to prevent scrollbar issue and allow full width */
        width: 100%;
        /* overflow-x: auto; Removed, relying on natural table width or parent wrapper */
    }

    /* Reduce padding for category sections on mobile to give more width to content */
    .category-section {
        padding: 5px !important;
    }

    /* Restore padding for stats cards to look good */
    .stats-grid .category-section {
        padding: 20px 20px 40px 20px !important;
    }

    /* Adjust table header/cell padding for small screens */
    th,
    td {
        padding: 8px 6px;
        font-size: 0.9rem;
        white-space: nowrap;
        /* Prevent wrapping which makes rows too tall */
    }

    /* Hide less important columns if needed, OR just scroll. Scroll is chosen. */

    /* Reduce URL column width on mobile */
    .url-cell {
        max-width: 120px !important;
    }

    /* Dashboard Stats Stack */
    .stats-grid {
        flex-direction: column !important;
    }

    /* Form flex wrap for mobile */
    .form-group>div[style*="display: flex"] {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .form-group>div[style*="display: flex"]>input,
    .form-group>div[style*="display: flex"]>button {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    /* Sticky Bar adjustments for mobile */
    .sticky-top-bar {
        padding: 10px !important;
        font-size: 0.85rem;
    }

    .sticky-bar-content {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center;
    }

    .action-controls {
        flex-direction: column !important;
        width: 100%;
        gap: 8px !important;
    }

    .action-controls form {
        flex-direction: column !important;
        width: 100%;
        gap: 5px !important;
    }

    .sticky-top-bar select {
        width: 100% !important;
        margin-bottom: 0px;
    }

    .sticky-top-bar button {
        width: 100% !important;
        margin-left: 0 !important;
    }
}