:root {
    --primary-color: #ff5e00;
    --secondary-color: #ff7e30;
    --accent-color: #ffffff;
    --background-color: #121212;
    --card-background: #1d1d1d;
    --text-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.6);
    --header-height: 80px;
    --gradient-start: #ff5e00;
    --gradient-middle: #ff7e30;
    --gradient-end: #ff8c40;
    --card-hover-color: rgba(255, 94, 0, 0.15);
    --button-hover: #ff8c40;
    --border-color: #2a2a2a;
    --input-background: #252525;
    --tab-inactive: #1d1d1d;
    --tab-hover: #252525;
}

.dark-theme {
    --primary-color: #ff6c00;
    --secondary-color: #ff8c40;
    --accent-color: #ffffff;
    --background-color: #0d0d0d;
    --card-background: #1a1a1a;
    --text-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --card-hover-color: rgba(255, 108, 0, 0.15);
    --button-hover: #ff8c40;
    --border-color: #1c1c1c;
    --input-background: #1a1a1a;
    --tab-inactive: #1a1a1a;
    --tab-hover: #222222;
    --gradient-start: #ff6c00;
    --gradient-middle: #ff8c40;
    --gradient-end: #ffa45e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    background-image: radial-gradient(circle at center, rgba(40, 40, 40, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
    background-size: 100% 100%;
    background-attachment: fixed;
}

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

/* Header styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.logo svg {
    margin-right: 20px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
}

.logo:hover svg {
    transform: scale(1.08) rotate(5deg);
}

.title-container {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 2px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 14px;
    color: #bbb;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--input-background);
    border-radius: 30px;
    padding: 8px 18px;
    width: 340px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.search-box:hover, .search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 94, 0, 0.15);
    transform: translateY(-2px);
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    padding: 8px;
    outline: none;
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-box button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 18px;
    padding: 0 8px;
    transition: transform 0.3s, color 0.3s;
}

.search-box button:hover {
    transform: scale(1.2);
    color: var(--secondary-color);
}

/* Category tabs styles */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    padding: 0 15px;
}

.tab {
    padding: 10px 20px;
    background-color: var(--tab-inactive);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.tab:hover {
    background-color: var(--tab-hover);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tab.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(255, 94, 0, 0.25);
}

/* Website card styles */
main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.website-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    justify-content: flex-start;
}

.site-card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 25px 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 130px;
    width: 170px;
    flex-shrink: 0;
}

.site-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--card-hover-color) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    border-color: var(--primary-color);
}

.site-card:hover:before {
    opacity: 1;
}

.site-icon {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--primary-color);
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    background: rgba(255, 94, 0, 0.1);
    border-radius: 50%;
}

.site-card:hover .site-icon {
    transform: scale(1.15);
    color: var(--gradient-end);
    background: rgba(255, 94, 0, 0.15);
}

.site-info {
    position: relative;
    z-index: 1;
    width: 100%;
}

.site-info h3 {
    font-size: 15px;
    margin-bottom: 0;
    font-weight: 500;
    transition: color 0.3s;
}

.site-card:hover .site-info h3 {
    color: var(--primary-color);
}

/* Category title with counts */
.category-section {
    margin-bottom: 40px;
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    background: linear-gradient(90deg, var(--card-background) 50%, transparent);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Removing history drawer styles */
.history-button-container, 
.history-drawer, 
.history-overlay, 
.history-header, 
.history-content, 
.history-item, 
.history-item-icon, 
.history-item-info, 
.history-item-name, 
.history-item-time, 
.history-footer, 
#clear-history-btn, 
.no-history {
    display: none;
}

/* Footer styles */
footer {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    opacity: 0.7;
    background: linear-gradient(180deg, var(--background-color), rgba(18, 18, 18, 0.95));
}

.theme-toggle button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.theme-toggle button:hover {
    color: var(--gradient-end);
    border-color: var(--primary-color);
    transform: translateY(-3px) rotate(15deg);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
}

.no-results i {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .search-box {
        width: 100%;
        max-width: 400px;
    }

    .logo {
        justify-content: center;
    }
    
    .website-grid {
        gap: 12px;
        justify-content: center;
    }
    
    footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px 0;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .site-card {
        width: calc(33.33% - 8px);
        min-width: 140px;
        min-height: 120px;
        padding: 15px 10px;
    }
    
    .category-title {
        font-size: 18px;
    }

    .category-tabs {
        gap: 8px;
        margin-bottom: 25px;
    }

    .tab {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px 8px;
    }
    
    .category-tabs {
        justify-content: flex-start;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -8px 20px;
        padding: 0 8px;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab {
        padding: 8px 14px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .website-grid {
        gap: 10px;
        justify-content: space-between;
    }
    
    .site-card {
        width: calc(50% - 5px);
        min-width: 0;
        min-height: 100px;
        padding: 12px 8px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .logo svg {
        margin: 0;
        width: 50px;
        height: 50px;
    }
    
    .logo h1 {
        font-size: 24px;
        margin-bottom: 0;
    }

    .subtitle {
        font-size: 12px;
    }

    .site-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
        margin-bottom: 8px;
    }

    .site-info h3 {
        font-size: 12px;
        line-height: 1.3;
    }

    .category-header {
        padding: 10px;
        margin-bottom: 12px;
    }

    .category-title {
        font-size: 15px;
        padding-left: 8px;
    }

    footer {
        margin-top: 25px;
        padding: 15px 0;
        font-size: 12px;
    }

    .search-box {
        padding: 6px 14px;
    }

    .search-box input {
        font-size: 14px;
        padding: 6px;
    }

    .search-box button {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 10px 6px;
    }

    .website-grid {
        gap: 8px;
    }
    
    .site-card {
        width: calc(50% - 4px);
        min-height: 90px;
        padding: 10px 6px;
    }

    .site-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin-bottom: 6px;
    }

    .site-info h3 {
        font-size: 11px;
    }

    .logo h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 11px;
    }

    .search-box {
        padding: 5px 12px;
    }

    .search-box input {
        font-size: 13px;
        padding: 5px;
    }

    .category-tabs {
        gap: 6px;
    }

    .tab {
        padding: 6px 12px;
        font-size: 11px;
    }
}

.category-container {
    margin-bottom: 50px;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.category-container:hover {
    background-color: rgba(30, 30, 30, 0.4);
}

.tab-container {
    display: flex;
    justify-content: center;
    background-color: rgba(20, 20, 20, 0.6);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}