/* OSINT Tools - Matrix Theme Custom Styles */

/* ===================================
   Color Variables & Base Styles
   =================================== */
:root {
    --matrix-black: #0d0d0d;
    --matrix-green: #00ff41;
    --matrix-green-dark: #008f11;
    --matrix-green-bright: #00d937;
    --matrix-gray: #e0e0e0;
    --matrix-card: #1a1a1a;
    --matrix-border: rgba(0, 255, 65, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--matrix-black);
    color: var(--matrix-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   Background Patterns
   =================================== */
.bg-grid-pattern {
    background-color: #020617; /* Slate-950 深色底 */
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* IDE / Cyber Tactical Map Styles */
.cyber-panel {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    border: 1px solid rgba(0, 255, 65, 0.15);
    border-radius: 0.5rem;
    overflow: hidden;
}

.cyber-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 255, 65, 0.5) 50%, 
        transparent 100%);
    animation: scan-line 3s ease-in-out infinite;
}

@keyframes scan-line {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.cyber-panel-header {
    background: linear-gradient(to bottom, 
        rgba(0, 255, 65, 0.08) 0%, 
        rgba(0, 255, 65, 0.02) 100%);
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cyber-panel-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--matrix-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cyber-panel-title::before {
    content: '//';
    color: rgba(0, 255, 65, 0.4);
}

.cyber-dots {
    display: flex;
    gap: 0.375rem;
}

.cyber-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: rgba(0, 255, 65, 0.3);
    border: 1px solid rgba(0, 255, 65, 0.5);
}

.cyber-dot.active {
    background-color: var(--matrix-green);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cyber-panel-body {
    padding: 1rem;
}

/* IDE-style Line Numbers */
.line-number-indicator {
    display: inline-flex;
    align-items: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: rgba(0, 255, 65, 0.3);
    margin-right: 0.5rem;
    user-select: none;
}

/* Tactical Map Grid */
.tactical-grid {
    position: relative;
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ===================================
   Navigation Styles
   =================================== */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
    color: var(--matrix-gray);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--matrix-green);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--matrix-green);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-mobile {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--matrix-gray);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-link-mobile:hover {
    color: var(--matrix-green);
    background-color: rgba(0, 255, 65, 0.05);
    border-left-color: var(--matrix-green);
}

/* Google Sign In Button - Navigation Bar */
.google-signin-btn-nav {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--matrix-green-dark), var(--matrix-green));
    color: var(--matrix-black);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 255, 65, 0.2);
}

.google-signin-btn-nav:hover {
    background: linear-gradient(135deg, var(--matrix-green), var(--matrix-green-bright));
    box-shadow: 0 4px 16px rgba(0, 255, 65, 0.4);
    transform: translateY(-2px);
}

.google-signin-btn-nav-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--matrix-green-dark), var(--matrix-green));
    color: var(--matrix-black);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 255, 65, 0.2);
    margin-top: 0.5rem;
}

.google-signin-btn-nav-mobile:hover {
    background: linear-gradient(135deg, var(--matrix-green), var(--matrix-green-bright));
    box-shadow: 0 4px 16px rgba(0, 255, 65, 0.4);
}

/* ===================================
   Tool Card Styles
   =================================== */
.tool-card {
    position: relative;
    background-color: var(--matrix-card);
    border: 1px solid var(--matrix-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.tool-card:hover {
    border-color: var(--matrix-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

.tool-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    border-radius: 0.5rem;
    color: var(--matrix-green);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
}

.tool-card-link:hover {
    background-color: var(--matrix-green);
    color: var(--matrix-black);
    border-color: var(--matrix-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

.tool-card-link i {
    transition: transform 0.3s ease;
}

.tool-card-link:hover i {
    transform: translateX(4px);
}

/* ===================================
   Category Card Styles
   =================================== */
.category-card {
    display: block;
    background-color: var(--matrix-card);
    border: 1px solid var(--matrix-border);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.category-card:hover {
    border-color: var(--matrix-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    transform: translateX(4px);
}

/* ===================================
   Footer Styles
   =================================== */
.footer-link {
    color: var(--matrix-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--matrix-green);
    padding-left: 0.25rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    border-radius: 0.5rem;
    color: var(--matrix-green);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.125rem;
}

.social-icon:hover {
    background-color: var(--matrix-green);
    color: var(--matrix-black);
    border-color: var(--matrix-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

/* ===================================
   Pagination Styles
   =================================== */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--matrix-card);
    border: 1px solid var(--matrix-border);
    border-radius: 0.5rem;
    color: var(--matrix-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: var(--matrix-green);
    color: var(--matrix-black);
    border-color: var(--matrix-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
}

.pagination-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===================================
   Tool Detail Button Styles
   =================================== */
.tool-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    border-radius: 0.25rem;
    color: var(--matrix-green);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tool-detail-btn:hover {
    background-color: var(--matrix-green);
    color: var(--matrix-black);
    border-color: var(--matrix-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
}

.tool-detail-btn-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    border-radius: 0.5rem;
    color: var(--matrix-green);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-detail-btn-large:hover {
    background-color: var(--matrix-green);
    color: var(--matrix-black);
    border-color: var(--matrix-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
}

/* Favorite Button */
.favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    border-radius: 0.5rem;
    color: var(--matrix-green);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.favorite-btn:hover {
    background-color: rgba(0, 255, 65, 0.15);
    border-color: var(--matrix-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    transform: scale(1.05);
}

/* Favorited state - Dynamic color applied via JS */
.favorite-btn.favorited {
    /* Color applied dynamically via JavaScript based on category */
}

.favorite-btn.favorited i::before {
    content: '\f005'; /* fas fa-star (solid) */
}


.favorite-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.favorite-btn.loading {
    pointer-events: none;
}

.favorite-btn.loading i {
    animation: spin 0.6s linear infinite;
}

/* ===================================
   Modal Styles
   =================================== */

/* Google Binding Modal specific styles */
.google-binding-modal .modal-body ul {
    list-style: none;
    padding: 0;
}

.google-binding-modal .modal-body ul li {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.google-binding-modal .btn-dismiss-google-binding {
    background-color: transparent;
    border: 1px solid var(--matrix-border);
    color: var(--matrix-gray);
}

.google-binding-modal .btn-dismiss-google-binding:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--matrix-gray);
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

.modal-content {
    background-color: var(--matrix-card);
    border: 2px solid var(--matrix-green);
    border-radius: 0.75rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--matrix-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.modal-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-icon i {
    font-size: 1.5rem;
    color: var(--matrix-green);
}

.modal-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--matrix-green);
    margin: 0;
    flex: 1;
}

.modal-close {
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    border-radius: 0.25rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--matrix-green);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modal-close:hover {
    background-color: var(--matrix-green);
    color: var(--matrix-black);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--matrix-green-dark);
    margin-bottom: 1rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(0, 255, 65, 0.05);
    border-radius: 0.25rem;
}

.modal-description {
    color: var(--matrix-gray);
    line-height: 1.8;
    font-size: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--matrix-border);
    display: flex;
    gap: 0.75rem;
}

.modal-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-family: 'Share Tech Mono', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.modal-btn-primary {
    background-color: var(--matrix-green);
    color: var(--matrix-black);
    border: 2px solid var(--matrix-green);
}

.modal-btn-primary:hover {
    background-color: var(--matrix-green-bright);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

.modal-btn-secondary {
    background-color: transparent;
    color: var(--matrix-green);
    border: 2px solid var(--matrix-border);
}

.modal-btn-secondary:hover {
    background-color: rgba(0, 255, 65, 0.1);
    border-color: var(--matrix-green);
}

/* ===================================
   User Navigation & Authentication
   =================================== */
.google-login-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    border-radius: 0.5rem;
    color: var(--matrix-green);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.google-login-btn:hover {
    background-color: var(--matrix-green);
    color: var(--matrix-black);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    transform: translateY(-2px);
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem 0.25rem 0.25rem;
    background-color: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--matrix-border);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile-btn:hover {
    background-color: rgba(0, 255, 65, 0.1);
    border-color: var(--matrix-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    overflow: hidden;
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar i {
    color: var(--matrix-green);
    font-size: 1rem;
}

.user-nickname {
    color: var(--matrix-green);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ===================================
   User Sidebar
   =================================== */
.user-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-sidebar-overlay.active {
    opacity: 1;
}

.user-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: var(--matrix-card);
    border-left: 2px solid var(--matrix-green);
    box-shadow: -5px 0 30px rgba(0, 255, 65, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.user-sidebar-overlay.active .user-sidebar {
    transform: translateX(0);
}

.user-sidebar-header {
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--matrix-border);
    display: flex;
    justify-content: flex-end;
}

.user-sidebar-close {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    border-radius: 0.5rem;
    color: var(--matrix-green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-sidebar-close:hover {
    background-color: var(--matrix-green);
    color: var(--matrix-black);
    transform: rotate(90deg);
}

.user-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.user-sidebar-section {
    margin-bottom: 1.5rem;
}

/* User Profile Section */
.user-profile-section {
    text-align: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--matrix-border);
}

.user-avatar-large {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    background-color: rgba(0, 255, 65, 0.1);
    border: 2px solid var(--matrix-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-large i {
    color: var(--matrix-green);
    font-size: 2rem;
}

.user-nickname-large {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--matrix-green);
    margin: 0 0 0.5rem 0;
}

/* Google Login Button Large */
.google-login-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: var(--matrix-green);
    color: var(--matrix-black);
    border: 2px solid var(--matrix-green);
    border-radius: 0.75rem;
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.google-login-btn-large:hover {
    background-color: var(--matrix-green-bright);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

/* User Menu Section */
.user-menu-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--matrix-border);
    border-radius: 0.5rem;
    color: var(--matrix-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-menu-item:hover {
    background-color: rgba(0, 255, 65, 0.1);
    border-color: var(--matrix-green);
    color: var(--matrix-green);
}

.user-menu-item i:first-child {
    color: var(--matrix-green);
    font-size: 1.125rem;
    width: 1.5rem;
    text-align: center;
}

.user-menu-item span {
    flex: 1;
}

.user-menu-item.logout-btn {
    border-color: rgba(255, 65, 65, 0.3);
}

.user-menu-item.logout-btn:hover {
    background-color: rgba(255, 65, 65, 0.1);
    border-color: rgba(255, 65, 65, 0.5);
    color: #ff4141;
}

.user-menu-item.logout-btn i:first-child {
    color: #ff4141;
}

/* Guest Badge */
.user-guest-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background-color: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--matrix-border);
    border-radius: 1rem;
    color: var(--matrix-green);
    font-size: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    margin-top: 0.5rem;
}

/* Google Login Button Compact (in sidebar) */
.google-login-btn-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--matrix-green-dark), var(--matrix-green));
    color: var(--matrix-black);
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 255, 65, 0.3);
}

.google-login-btn-compact:hover {
    background: linear-gradient(135deg, var(--matrix-green), var(--matrix-green-bright));
    box-shadow: 0 4px 12px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 640px) {
    .user-sidebar {
        max-width: 100%;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===================================
   Animations
   =================================== */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 255, 65, 0.6);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Matrix rain effect for hero section (optional) */
@keyframes matrix-fall {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* ===================================
   Scrollbar Styling
   =================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--matrix-black);
}

::-webkit-scrollbar-thumb {
    background: var(--matrix-green-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--matrix-green);
}

/* ===================================
   Loading States
   =================================== */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--matrix-border);
    border-top-color: var(--matrix-green);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ===================================
   Responsive Utilities
   =================================== */
@media (max-width: 768px) {
    .tool-card {
        padding: 1rem;
    }
    
    .category-card {
        padding: 0.75rem;
    }
}

/* ===================================
   Focus States for Accessibility
   =================================== */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--matrix-green);
    outline-offset: 2px;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .tool-card,
    .category-card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
