body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding-top: 60px; /* Make space for the fixed navbar */
    /* Subtle noise texture */
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 250 250" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" stitchTiles="stitch"/%3E%3CfeColorMatrix type="saturate" values="0"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noise)" opacity="0.05"/%3E%3C/svg%3E');
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.brand-tag {
    font-size: 0.8rem;
    font-weight: 300;
    color: #aaa;
    margin-left: 0.5rem;
}

.navbar-links a {
    color: #e0e0e0;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 1rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.navbar-links a:hover, .navbar-links a.active {
    color: #fff;
    border-bottom-color: #3f51b5;
}

.home-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: none;
}

.hero-section .subtitle {
    font-size: 1.25rem;
    color: #aaa;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-button {
    background-color: #3f51b5;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 0 10px rgba(63, 81, 181, 0.5), 0 0 20px rgba(63, 81, 181, 0.3);
}

.cta-button:hover {
    background-color: #303f9f;
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(63, 81, 181, 0.8), 0 0 25px rgba(63, 81, 181, 0.6);
}

.features-section {
    margin-top: 5rem;
}

.features-section h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

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

.feature-card {
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}

.feature-card .material-symbols-outlined {
    font-size: 3rem;
    color: #3f51b5;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #aaa;
    line-height: 1.6;
}

.site-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid #333;
}

.connect-section {
    margin-top: 3rem;
}

.connect-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.connect-section h3 span {
    font-size: 0.9rem;
    color: #aaa;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    color: #e0e0e0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #3f51b5;
}

.social-links .icon {
    width: 24px;
    height: 24px;
}

/* Scanner Page Specific Styles */
.container {
    display: flex;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
}

.scanner-section, .analysis-section {
    background-color: #1e1e1e;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 
        0px 2.8px 2.2px rgba(0, 0, 0, 0.034),
        0px 6.7px 5.3px rgba(0, 0, 0, 0.048),
        0px 12.5px 10px rgba(0, 0, 0, 0.06),
        0px 22.3px 17.9px rgba(0, 0, 0, 0.072),
        0px 41.8px 33.4px rgba(0, 0, 0, 0.086),
        0px 100px 80px rgba(0, 0, 0, 0.12);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.analysis-section h1, .scanner-section h1, .analysis-section h2 {
    margin-top: 0;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
    font-weight: 500;
}

.analysis-group {
    margin-top: 2rem;
    border-top: 1px solid #333;
    padding-top: 1.5rem;
}

.analysis-group h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #b0b0b0;
    border-bottom: none;
}


#history-section {
    margin-bottom: 2rem;
}

#history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

#history-list li {
    background-color: #2c2c2c;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#history-list li:hover {
    background-color: #3f51b5;
}

#history-list .history-item-data {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

#history-list .history-item-time {
    font-size: 0.8rem;
    color: #aaa;
}

#image-container {
    width: 100%;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1; /* Makes it take available space */
    border: 2px dashed #444;
    transition: border-color 0.2s, background-color 0.2s;
}

#image-container.drag-over {
    background-color: #2a2a2a;
    border-color: #3f51b5;
}

#drop-zone-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #666;
}

#drop-zone-placeholder .material-symbols-outlined {
    font-size: 4rem;
}

#drop-zone-placeholder.hidden {
    display: none;
}

#uploaded-image, #camera-feed {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none; /* Initially hidden */
}

#uploaded-image.visible, #camera-feed.visible {
    display: block;
}

#drop-zone {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    border-radius: 8px; /* Match container */
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

#file-input {
    display: none;
}

.file-label, #scan-btn {
    background-color: #3f51b5;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    box-shadow: 0 0 5px rgba(63, 81, 181, 0.5), 0 0 10px rgba(63, 81, 181, 0.3);
}

.file-label:hover, #scan-btn:hover {
    background-color: #303f9f;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(63, 81, 181, 0.8), 0 0 25px rgba(63, 81, 181, 0.6);
}

#wifi-security-notice {
    background-color: #3f51b5;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#wifi-security-notice.hidden {
    display: none;
}

/* Info Icon and Modal */
.info-icon-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #3f51b5;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.info-icon-container:hover {
    transform: scale(1.1);
}

.modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #2c2c2c;
    margin: auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-top: 0;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

.modal-content ul {
    padding-left: 20px;
}

.modal-content li {
    margin-bottom: 0.75rem;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #fff;
}


/* Generator Page Specific Styles */
.generator-section-layout {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.generator-form-container {
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 12px;
    flex: 2;
    text-align: left;
}

.generator-preview-container {
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 12px;
    flex: 3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-type-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

#barcode-type-select, #qr-type-select {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    background-color: #2c2c2c;
    color: #e0e0e0;
    border: 1px solid #444;
    font-size: 1rem;
}

#form-container input, #form-container textarea, #form-container select {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    background-color: #2c2c2c;
    color: #e0e0e0;
    border: 1px solid #444;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

#form-container textarea {
    min-height: 120px;
    resize: vertical;
}

.color-picker-container {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.color-picker-container label {
    font-size: 1rem;
}

.color-picker-container input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: transparent;
}

#qr-result {
    text-align: center;
}

#qr-result h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

#qr-canvas {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    max-width: 100%;
}

#download-btn {
    margin-top: 2rem;
    display: inline-block;
}

#qr-result.hidden { 
    display: none; 
}

/* Responsive Design */
@media (max-width: 992px) {
    .container, .generator-section-layout {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .navbar-links {
        margin-top: 1rem;
    }

    .navbar-links a {
        margin-left: 1rem;
    }

    .home-container {
        padding: 1rem;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 1rem;
    }

    .scanner-section, .analysis-section, .generator-form-container, .generator-preview-container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-links a {
        font-size: 0.9rem;
        margin-left: 0.75rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .subtitle {
        font-size: 1rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 0.8rem 2rem;
    }

    .features-section h2 {
        font-size: 1.5rem;
    }

    .analysis-section h1, .scanner-section h1, .analysis-section h2, .generator-form-container h1 {
        font-size: 1.5rem;
    }

    .button-container {
        flex-direction: column;
    }
}
