/* Base Styles */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
}

header {
    padding: 40px 20px;
    border-bottom: 1px solid #222;
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
}

.header-main {
    margin-bottom: 30px;
}

.site-title {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    background: linear-gradient(90deg, #ffffff, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.site-tagline {
    margin: 5px 0 0 0;
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-weight: 600;
}

nav .nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-tools, .nav-info {
    display: flex;
    gap: 15px;
}

nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

#lang-select {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
}

#lang-select:hover {
    background-color: #444;
}

.about-link {
    background-color: #333;
}

nav a:hover {
    background-color: #444;
}

/* Main Layout */
main#app {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Home Section */
.welcome-section {
    padding: 60px 0;
    max-width: 900px;
    margin: 0 auto;
}

.welcome-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
}

.welcome-desc {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 50px;
    line-height: 1.6;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.feature-card {
    background: #1a1a1a;
    border: 1px solid #222;
    padding: 40px 30px;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-card:hover {
    border-color: #3498db;
    transform: translateY(-5px);
    background: #1e1e1e;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    color: #fff;
}

.feature-card p {
    color: #888;
    line-height: 1.5;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.feature-link {
    color: #3498db;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Scanner Layout */
.scanner-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
}

@media (max-width: 1024px) {
    .scanner-grid {
        grid-template-columns: 1fr;
    }
}

/* Dropzone Styles */
.dashed-border {
    border: 2px dashed #444;
    border-radius: 16px;
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #1a1a1a;
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
}

.dashed-border:hover, .dashed-border.drag-active {
    border-color: #3498db;
    background-color: #222;
}

.dropzone-prompt {
    text-align: center;
    padding: 20px;
}

.icon-xl {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: 15px;
}

.image-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dropzone-footer {
    margin-top: 20px;
}

.file-info {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 15px;
}

.action-panel {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #222;
}

.watermark-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.watermark-controls input {
    flex: 1;
    background: #000;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    outline: none;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

/* Panel Styles */
.results-panel {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #222;
    height: fit-content;
}

.panel-section {
    margin-bottom: 30px;
}

.panel-title {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
}

.btn-primary:disabled {
    background-color: #333;
    color: #666;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #222;
    color: #e0e0e0;
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid #333;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #333;
}

.btn-x {
    background-color: #000;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid #333;
}

/* Status & Results */
.status-text {
    font-size: 1.2rem;
    font-weight: 500;
}

.status-text.ready { color: #3498db; }
.status-text.error { color: #e74c3c; }

.result-row {
    margin-bottom: 15px;
}

.result-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.progress-bar {
    background: #000;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    background: #3498db;
    height: 100%;
    transition: width 0.5s;
}

/* Metadata Results specific styles */
.meta-group {
    margin-bottom: 20px;
}

.meta-label {
    font-weight: bold;
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-value {
    background: #000;
    padding: 12px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    border-left: 3px solid #3498db;
}

.raw-data {
    font-size: 0.8rem;
    color: #555;
    margin-top: 20px;
}

.raw-data pre {
    background: #000;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
}

/* History */
.history-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #222;
}

.history-list {
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
}

.history-card {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    gap: 20px;
    border: 1px solid #222;
}

.history-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.mini-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.hidden { display: none !important; }

/* About Styles */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.about-section {
    margin-bottom: 40px;
}

.disclaimer-box, .arch-box {
    background-color: #1a1a1a;
    border-left: 4px solid #f39c12;
    padding: 15px 20px;
    margin: 20px 0;
    font-size: 0.95rem;
}

.arch-box {
    border-left-color: #3498db;
}

.presence-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.presence-link {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #222;
    transition: background-color 0.2s;
}

.presence-link:hover {
    background-color: #333;
}

.x-button-container {
    text-align: center;
    margin-top: 50px;
}

.x-button {
    display: inline-flex;
    align-items: center;
    background-color: #000;
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    border: 1px solid #333;
    transition: transform 0.2s, background-color 0.2s;
}

.x-button:hover {
    background-color: #111;
    transform: scale(1.05);
}

.x-handle {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 8px;
}

@media (max-width: 768px) {
    header { padding: 30px 15px; }
    .site-title { font-size: 1.8rem; }
    main#app { padding: 20px 15px; }
    .welcome-title { font-size: 1.8rem; }
    .feature-grid { grid-template-columns: 1fr; }
}
