:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-muted: #777;
    --bg-color: #f5f5f5;
    --card-bg: white;
    --bg-card: white;
    --border-color: #eee;
    --secondary-text: #666;
    --category-bg: rgba(52, 152, 219, 0.08);
    --description-color: #555;
    --tag-bg: rgba(52, 152, 219, 0.15);
    --tag-color: #2980b9;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 3px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 15px rgba(0,0,0,0.15);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3498db;
        --primary-dark: #5dade2;
        --accent-color: #e74c3c;
        --text-color: #e0e0e0;
        --text-muted: #999;
        --bg-color: #121212;
        --card-bg: #1e1e1e;
        --bg-card: #1e1e1e;
        --border-color: #333;
        --secondary-text: #bbb;
        --category-bg: rgba(52, 152, 219, 0.1);
        --description-color: #aaa;
        --tag-bg: rgba(52, 152, 219, 0.25);
        --tag-color: #5dade2;
        --shadow-sm: 0 2px 5px rgba(0,0,0,0.15);
        --shadow-md: 0 3px 8px rgba(0,0,0,0.2);
        --shadow-lg: 0 5px 15px rgba(0,0,0,0.3);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-image: 
        radial-gradient(var(--primary-color) 0.5px, transparent 0.5px), 
        radial-gradient(var(--primary-color) 0.5px, var(--bg-color) 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    background-attachment: fixed;
    background-blend-mode: multiply;
    opacity: 1;
}

.container {
    max-width: 900px;
    padding: 30px;
    margin: 40px auto;
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: background-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.container:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.search-container {
    margin: 25px 0;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 16px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-container::before {
    content: "🔍";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

h1 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
    position: relative;
}

h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
}

h1::before {
    content: "🖥️";
    margin-right: 15px;
    font-size: 1.2em;
    transition: transform var(--transition-fast);
}

h1:hover::before {
    transform: rotate(5deg) scale(1.1);
}

h2 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

h2:hover::after {
    width: 100%;
}

.category {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--category-bg);
    border-radius: var(--radius-md);
    transition: opacity var(--transition-normal), transform var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-title {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
}

.service {
    margin-bottom: 20px;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service:last-child {
    margin-bottom: 0;
}

.service:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.service::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
    opacity: 0.7;
}

.service::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 0;
    pointer-events: none;
}

.service:hover::after {
    opacity: 0.05;
}

.service h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    font-size: 1.3rem;
}

.service-description {
    color: var(--description-color);
    font-size: 0.95em;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

.links {
    list-style-type: none;
    padding-left: 0;
    margin: 12px 0 5px 0;
    position: relative;
    z-index: 1;
}

.primary-links {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.alternative-links {
    font-size: 0.9em;
    color: var(--secondary-text);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    background-color: rgba(52, 152, 219, 0.1);
    position: relative;
    overflow: hidden;
}

a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-normal);
}

.primary-links a {
    font-weight: 500;
}

a:hover {
    color: var(--primary-dark);
    background-color: rgba(52, 152, 219, 0.2);
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hidden {
    display: none;
}

.faded {
    opacity: 0.4;
}

.tag {
    display: inline-block;
    background-color: var(--tag-bg);
    color: var(--tag-color);
    font-size: 0.75em;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    vertical-align: middle;
    transition: all var(--transition-fast);
}

.service:hover .tag {
    background-color: var(--tag-color);
    color: white;
}

footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9em;
    color: var(--secondary-text);
    padding: 20px;
    position: relative;
}

footer a {
    font-size: 1.2em;
    transition: transform var(--transition-normal);
    display: inline-block;
}

footer a:hover {
    transform: scale(1.2);
}

.timestamp {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 10px;
    display: block;
}

/* Service icons */
.esphome h3::before {
    content: "🏠";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.flaresolverr h3::before {
    content: "🛡️";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.homeassistant h3::before {
    content: "🏡";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.homarr h3::before {
    content: "📊";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.jellyfin h3::before {
    content: "🎬";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.jellyseerr h3::before {
    content: "🍿";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.photoprism h3::before {
    content: "📸";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.prowlarr h3::before {
    content: "🔍";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.qbittorrent h3::before {
    content: "📥";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.radarr h3::before {
    content: "🎥";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.sherlock h3::before {
    content: "🔎";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.sonarr h3::before {
    content: "📺";
    margin-right: 10px;
    transition: transform var(--transition-fast);
}

.service:hover h3::before {
    transform: scale(1.2);
}

#scroll-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--primary-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-normal), transform var(--transition-normal), background-color var(--transition-fast);
    box-shadow: var(--shadow-md);
    transform: translateY(20px);
    font-size: 22px;
    z-index: 1000;
}

#scroll-to-top.visible {
    opacity: 0.9;
    transform: translateY(0);
}

#scroll-to-top:hover {
    opacity: 1;
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* Contact section styles */
.contact-section {
    margin-top: 10px;
    margin-bottom: 35px;
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    border: none;
    position: relative;
    box-shadow: var(--shadow-sm);
    padding: 10px;
}

.contact-section::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color), transparent);
    margin: 35px 0 15px;
    opacity: 0.6;
}

.profile-container {
    display: flex;
    justify-content: center;
    padding: 0;
}

.profile-card {
    background-color: transparent;
    border-radius: var(--radius-md);
    padding: 15px 20px 20px;
    width: 100%;
    box-shadow: none;
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    position: relative;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.8em;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

.profile-header h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.profile-header:hover h3::after {
    width: 100%;
}

.welcome-message {
    margin: 10px 0 25px;
    font-size: 1.1em;
    color: var(--description-color);
    line-height: 1.6;
    border-left: 3px solid var(--primary-color);
    padding: 10px 0 10px 20px;
    max-width: 90%;
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.profile-tag {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.profile-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: var(--accent-color);
}

.profile-description {
    color: var(--description-color);
    margin-bottom: 25px;
    font-size: 1em;
    line-height: 1.6;
    font-style: italic;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color);
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.social-link svg {
    transition: transform var(--transition-fast);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.social-link:hover svg {
    transform: scale(1.2);
    stroke: white;
}

.social-link::after {
    display: none;
}

.github:hover {
    background-color: #24292e;
    border-color: #24292e;
}

.linkedin:hover {
    background-color: #0077b5;
    border-color: #0077b5;
}

.email:hover {
    background-color: #d44638;
    border-color: #d44638;
}

/* Alternative links */
.toggle-alternatives {
    margin-top: 0.8rem;
}

.toggle-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
    opacity: 0.85;
}

.toggle-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 1;
}

.alternatives-container {
    display: none;
    background-color: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 15px;
    margin-top: 0.8rem;
    border-left: 3px solid var(--primary-color);
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.alternatives-container.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.alternative-group {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.alternative-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.alt-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.alternative-group a {
    display: inline-block;
    margin-right: 0.8rem;
    margin-bottom: 0.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 25px 20px;
        margin: 20px auto;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .contact-section {
        padding: 15px 10px;
    }
    
    .welcome-message {
        font-size: 1em;
        padding-left: 15px;
        max-width: 100%;
    }
    
    .profile-header h3 {
        font-size: 1.5em;
    }
    
    .social-links {
        gap: 10px;
    }
    
    .service {
        padding: 15px;
    }
    
    .service h3 {
        font-size: 1.2rem;
    }
    
    .service-description {
        padding-left: 20px;
    }
    
    .toggle-alternatives {
        width: 100%;
    }
    
    .toggle-btn {
        width: 100%;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
        margin: 15px auto;
    }
    
    .contact-section {
        padding: 10px;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .profile-tag {
        align-self: flex-start;
    }
    
    .welcome-message {
        font-size: 0.95em;
        padding-left: 10px;
    }
    
    .social-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-link {
        width: 100%;
        justify-content: center;
    }
    
    .primary-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .primary-links a {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
    
    .service {
        padding: 12px;
    }
    
    .service-description {
        padding-left: 15px;
    }
    
    .alternative-group a {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        margin-right: 0;
    }
}

/* Theme toggle and support for manual theme switching */
body[data-theme="light"] {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-muted: #777;
    --bg-color: #f5f5f5;
    --card-bg: white;
    --bg-card: white;
    --border-color: #eee;
    --secondary-text: #666;
    --category-bg: rgba(52, 152, 219, 0.08);
    --description-color: #555;
    --tag-bg: rgba(52, 152, 219, 0.15);
    --tag-color: #2980b9;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 3px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 15px rgba(0,0,0,0.15);
}

body[data-theme="dark"] {
    --primary-color: #3498db;
    --primary-dark: #5dade2;
    --accent-color: #e74c3c;
    --text-color: #e0e0e0;
    --text-muted: #999;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --bg-card: #1e1e1e;
    --border-color: #333;
    --secondary-text: #bbb;
    --category-bg: rgba(52, 152, 219, 0.1);
    --description-color: #aaa;
    --tag-bg: rgba(52, 152, 219, 0.25);
    --tag-color: #5dade2;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.15);
    --shadow-md: 0 3px 8px rgba(0,0,0,0.2);
    --shadow-lg: 0 5px 15px rgba(0,0,0,0.3);
}

/* Theme toggle button */
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--card-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

#theme-toggle:hover {
    transform: translateY(-3px) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

#theme-toggle.toggled {
    animation: rotate 0.5s ease;
}

#theme-toggle span {
    font-size: 1.3rem;
    transition: transform 0.3s;
}

@keyframes rotate {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}

/* Service counters */
.service-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    width: 22px;
    height: 22px;
    margin-left: 10px;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.category:hover .service-counter {
    transform: scale(1.1);
    background-color: var(--accent-color);
}

/* Category title emoji effects */
.category-emoji {
    display: inline-block;
    transition: transform var(--transition-fast);
    margin-right: 5px;
}

.category-title:hover .category-emoji {
    transform: scale(1.3);
}

/* Search clear button */
.search-container {
    position: relative;
}

.search-clear {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.7;
    transition: all var(--transition-fast);
}

.search-clear:hover {
    color: var(--accent-color);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Search highlights */
mark {
    background-color: rgba(231, 76, 60, 0.2);
    padding: 0 3px;
    border-radius: 3px;
    color: inherit;
    font-weight: bold;
    transition: background-color var(--transition-fast);
}

/* Toggle button clicked animation */
.toggle-btn.clicked {
    animation: pulse 0.3s ease;
}

/* Smooth fade in animation for the entire page */
.container {
    animation: fadeInSlideUp 0.8s ease-out;
}

@keyframes fadeInSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved mobile styles */
@media (max-width: 768px) {
    #theme-toggle {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    #theme-toggle span {
        font-size: 1.1rem;
    }
    
    /* Other existing mobile styles */
} 