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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: #0a0a0a;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(220, 20, 60, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(220, 20, 60, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Chipset circuit pattern overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(220, 20, 60, 0.02) 1px, transparent 1px),
        linear-gradient(rgba(220, 20, 60, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.02) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 100px 100px, 150px 150px;
    pointer-events: none;
    z-index: -1;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(60, 60, 60, 0.5);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qualcomm-icon {
    vertical-align: middle;
    width: 28px;
    height: 28px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
        url('hero-bg.png') center/cover no-repeat;
    color: white;
    padding: 6rem 0 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 1;
    font-weight: 300;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.qualcomm-icon-hero {
    vertical-align: middle;
}
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 1;
    font-weight: 300;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

/* Search Section */
.search-section {
    max-width: 700px;
    margin: 0 auto;
}

.search-note {
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.search-box:hover .search-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.7);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 50px;
    outline: none;
    color: #ffffff;
    background: transparent;
    backdrop-filter: blur(10px);
}

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

.search-box button {
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.search-box button:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.search-results {
    margin-top: 2rem;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(60, 60, 60, 0.5);
    display: none;
    overflow: hidden;
}

.search-results.active {
    display: block;
}

.results-header {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: white;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(60, 60, 60, 0.5);
}

.results-list {
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(40, 40, 40, 0.5);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.result-item:hover {
    background: rgba(40, 40, 40, 0.3);
    border-left: 3px solid #666;
}

.result-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.result-icon {
    font-size: 1.1rem;
    min-width: 20px;
}

.result-name {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95rem;
}

.result-brand {
    background: rgba(60, 60, 60, 0.3);
    color: #cccccc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(80, 80, 80, 0.5);
}

/* Minimal red accent for Flash Tools only */
.result-brand.flash-tools-brand {
    background: rgba(40, 20, 20, 0.4);
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.2);
}

.result-chip {
    background: rgba(40, 40, 40, 0.8);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    border: 1px solid rgba(60, 60, 60, 0.8);
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.3s;
}

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

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.search-result-item p {
    color: #666;
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 2rem 1rem;
    color: #cccccc;
}

.no-results p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.no-results p:first-child {
    font-weight: 500;
    color: #ffffff;
}

/* Tools Section */
.tools-section {
    padding: 4rem 0;
}

.tools-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #333;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: #666;
    margin-bottom: 1rem;
}

.tool-card button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: opacity 0.3s;
}

.tool-card button:hover {
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

/* Tool Interface */
.tool-interface {
    margin-top: 1rem;
}

.tool-interface input,
.tool-interface select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.tool-interface input:focus,
.tool-interface select:focus {
    outline: none;
    border-color: #667eea;
}

.tool-interface button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: opacity 0.3s;
}

.tool-interface button:hover {
    opacity: 0.9;
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 5px;
    min-height: 50px;
}

.result.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.result.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.info-box {
    background-color: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 5px;
}

.info-box p {
    margin-bottom: 0.5rem;
}

.info-box ul {
    margin-left: 1.5rem;
}

.info-box li {
    margin-bottom: 0.25rem;
}

/* About Section */
.about-section {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid rgba(60, 60, 60, 0.5);
}

.about-section h2 {
    color: #cccccc;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.about-section p {
    max-width: 800px;
    margin: 0 auto 1rem;
    color: #aaaaaa;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: #cccccc;
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(60, 60, 60, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 15px;
        padding: 1rem;
    }
    
    .search-tooltip {
        font-size: 0.85rem;
        padding: 0.8rem 1rem;
        max-width: 90%;
    }
    
    .search-box input {
        border-radius: 10px;
    }
    
    .search-box button {
        border-radius: 10px;
        width: 100%;
    }
    
    .search-note {
        font-size: 0.9rem;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .result-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}

/* Color Preview */
.color-preview {
    width: 100%;
    height: 100px;
    border-radius: 5px;
    margin-top: 1rem;
    border: 2px solid #e0e0e0;
}

/* Band List */
.band-list {
    text-align: left;
    margin-top: 1rem;
}

.band-list h4 {
    color: #667eea;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.band-list ul {
    list-style-position: inside;
}

.band-list li {
    padding: 0.25rem 0;
}

/* Welcome Popup */
.welcome-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.welcome-popup.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.popup-content {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    max-width: 450px;
    margin: 1rem;
    text-align: center;
    position: relative;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: popupSlideIn 0.4s ease-out;
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.8) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.popup-close:hover {
    color: #ffffff;
}

.popup-icon {
    margin-bottom: 1.5rem;
    font-size: 3rem;
}

.popup-content h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #ffffff;
}

.popup-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.popup-examples {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.example-tag {
    background: rgba(60, 60, 60, 0.5);
    color: #cccccc;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Body blur when popup is active */
body.popup-active {
    overflow: hidden;
}

body.popup-active > :not(.welcome-popup) {
    filter: blur(3px);
    pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .popup-content {
        margin: 1rem 0.5rem;
        padding: 1.5rem;
    }
    
    .popup-content h3 {
        font-size: 1.3rem;
    }
    
    .popup-content p {
        font-size: 0.9rem;
    }
}