
/* ========================================
   SELQIO TOOLS PLATFORM - MAIN STYLESHEET
   ======================================== */

/* VARIABLES & RESET */
:root {
    --primary-color: #007bff;
    --secondary-color: #6f42c1;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
}

/* GLOBAL RESET & BASE STYLES */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    margin: 0;
    padding-top: 60px;
    padding-bottom: 0;
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 60px;
}

.navbar-brand {
    font-family: 'Inter', sans-serif;
    text-decoration: none !important;
    transition: all 0.2s ease;
    letter-spacing: -0.5px;
}

.navbar-brand:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.navbar-brand img {
    height: 40px;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px 0;
    margin-top: -60px;
    padding-top: 140px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    height: 60px;
    font-size: 1.1rem;
    border: none;
    box-shadow: var(--shadow-md);
}

.search-btn {
    height: 60px;
    padding: 0 30px;
    font-weight: 600;
    background: var(--success-color);
    border: none;
}

.hero-nav {
    margin-top: 2rem;
}

.hero-nav .nav-link {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.hero-nav .nav-link:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ========================================
   AUTOCOMPLETE SEARCH
   ======================================== */

.autocomplete-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.autocomplete-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    text-align: left;
    display: flex;
    align-items: flex-start;
}

.autocomplete-item:hover {
    background: var(--light-bg);
}

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

.autocomplete-item i {
    font-size: 1.1rem !important;
    color: var(--primary-color) !important;
    width: 20px !important;
    height: 20px !important;
    text-align: center !important;
    margin-right: 15px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin-top: 0 !important;
}

.autocomplete-item .fa,
.autocomplete-item .fas,
.autocomplete-item .far,
.autocomplete-item .fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

.autocomplete-item .bi {
    font-family: "Bootstrap Icons" !important;
}

.autocomplete-item .fw-semibold {
    color: #333 !important;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 2px;
}

.autocomplete-item .text-muted {
    color: #6c757d !important;
    font-size: 0.85rem;
    line-height: 1.2;
}

.autocomplete-item .flex-grow-1 {
    flex-grow: 1;
    min-width: 0;
}

/* ========================================
   STATS SECTION
   ======================================== */

.stats-section {
    background: white;
    padding: 40px 0;
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.stat-card {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
}

/* ========================================
   BOOKMARK SYSTEM
   ======================================== */

.bookmark-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.bookmark-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-bg);
}

.bookmark-header-left {
    display: flex;
    align-items: center;
}

.bookmark-icon {
    color: var(--warning-color);
    margin-right: 12px;
    font-size: 1.3rem;
}

.bookmark-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    color: #333;
}

.bookmark-edit-btn {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.bookmark-edit-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* BOOKMARK FORM */
.bookmark-form {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    padding: 40px;
    margin: 20px 0;
    position: relative;
    border: 1px solid var(--border-color);
}

.bookmark-form .btn-close {
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: var(--shadow-sm);
}

.bookmark-form h3 {
    color: #333;
    font-weight: 700;
    margin-bottom: 30px;
}

.bookmark-input-group {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.bookmark-input-group .form-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.bookmark-input-group .form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.bookmark-input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.1);
}

.bookmark-add-btn {
    background: var(--success-color);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.bookmark-add-btn:hover {
    background: #218838;
}

/* BOOKMARK LIST */
.bookmark-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.bookmark-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 25px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

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

.bookmark-item:hover {
    background: var(--light-bg);
}

.bookmark-item-left {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.bookmark-favicon {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    border-radius: 4px;
}

.bookmark-details {
    flex-grow: 1;
}

.bookmark-name {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.3;
}

.bookmark-url {
    color: #6c757d;
    font-size: 0.8rem;
    text-decoration: none;
    display: block;
    margin-top: 2px;
}

.bookmark-name:hover {
    color: var(--primary-color);
}

.bookmark-url:hover {
    color: var(--secondary-color);
}

.bookmark-actions {
    display: flex;
    gap: 8px;
}

.bookmark-delete-btn {
    background: var(--danger-color);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.bookmark-delete-btn:hover {
    background: #c82333;
}

.hover-effect {
    transition: all 0.2s ease;
}

.hover-effect:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

/* ========================================
   TOOL CATEGORIES & GRID
   ======================================== */

.category-grid {
    margin: 50px 0;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    height: 100%;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-bg);
}

.category-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 10px;
}

.category-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.view-more-link {
    display: block;
    margin-top: auto;
    padding-top: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    border-top: 1px solid var(--light-bg);
}

.view-more-link:hover {
    color: var(--secondary-color);
}

/* ========================================
   TOOL LISTS & ITEMS
   ======================================== */

.tool-list {
    overflow-x: hidden;
    width: 100%;
}

.tool-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    overflow: hidden;
    width: 100%;
}

.tool-item:hover {
    background: var(--light-bg) !important;
}

.tool-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.tool-link > div {
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
}

.tool-item .fw-semibold {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.3;
}

.tool-item .text-muted {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 0.85rem;
}

.tool-link-icon {
    width: 24px;
    min-width: 24px;
    text-align: center;
    margin-right: 12px;
    color: var(--primary-color) !important;
    flex-shrink: 0;
}

/* ICON CONSISTENCY */
.tool-link-icon,
.autocomplete-item i,
.tool-item i,
.category-card i:not(.category-icon):not(.bookmark-icon) {
    color: var(--primary-color) !important;
    width: 30px;
    text-align: center;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tool-link i,
.tool-item a i {
    color: var(--primary-color) !important;
}

/* ========================================
   FAVORITE TOOLS SECTION
   ======================================== */

#favoriteToolsSection .tool-list {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
}

#favoriteToolsSection .tool-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    width: 100%;
    overflow: hidden;
}

#favoriteToolsSection .tool-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

#favoriteToolsSection .tool-link > div {
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
}

#favoriteToolsSection .fw-semibold {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

#favoriteToolsSection .text-muted {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

#favoriteToolsSection .tool-link-icon {
    width: 24px;
    min-width: 24px;
    text-align: center;
    margin-right: 12px;
    color: var(--primary-color) !important;
    flex-shrink: 0;
}

#favoriteToolsSection .tool-item i {
    color: var(--primary-color) !important;
    font-size: 1rem !important;
}

/* ========================================
   LAYOUT & CONTAINERS
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* ========================================
   FOOTER
   ======================================== */

.sticky-footer {
    margin-top: auto;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #FFFFFF;
    padding: 20px 0;
    margin-bottom: 0;
    margin-top: 20px;
}

/* ========================================
   ANIMATIONS & EFFECTS
   ======================================== */

.fade-toggle {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-toggle.show {
    display: block;
    opacity: 1;
}

/* ========================================
   EMPTY STATES
   ======================================== */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 15px;
    display: block;
}

/* ========================================
   SCROLLBARS
   ======================================== */

.tool-list::-webkit-scrollbar {
    width: 6px;
}

.tool-list::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 3px;
}

.tool-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.tool-list::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .search-input, .search-btn {
        height: 50px;
    }

    .category-card {
        padding: 20px 15px;
    }

    .bookmark-form {
        padding: 25px;
    }

    .bookmark-input-group {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .bookmark-section {
        padding: 20px;
        margin: 15px 0;
    }

    .bookmark-form {
        padding: 20px;
    }

    .category-card {
        padding: 15px 10px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .navbar-custom,
    .hero-section,
    .bookmark-section,
    .sticky-footer {
        display: none !important;
    }

    body {
        padding-top: 0;
        background: white;
    }

    .category-card {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}
