/* Basic Styles */
body { 
    font-family: sans-serif; 
    margin: 0; 
    line-height: 1.6;
    background: radial-gradient(circle at 30% 20%, rgba(45,75,105,0.45), rgba(20,35,50,0.90)),
                linear-gradient(135deg, #1a2d3f 0%, #152535 40%, #0f1d2a 100%);
    color: #f0f4f8;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Subtle tactical grid overlay */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px, 60px 60px;
    pointer-events: none;
    z-index: -2;
}

/* Faint concentric scan rings / radar effect */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 65% 70%, rgba(0,150,200,0.08), transparent 55%),
        radial-gradient(circle at 15% 30%, rgba(0,120,160,0.06), transparent 60%);
    mix-blend-mode: screen;
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

header {
    background: rgba(25,45,65,0.85); 
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 1.2rem 1rem; 
    text-align: center; 
    border-bottom: 1px solid rgba(100,160,200,0.3);
}

/* Dropdown Navigation Styles */
nav { 
    background: linear-gradient(90deg, #112333 0%, #0d1e2c 50%, #112533 100%);
    position: relative;
    border-bottom: 1px solid rgba(100,160,200,0.25);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

nav ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    text-align: center; 
}

nav ul li { 
    display: inline-block;
    position: relative;
}

nav ul li a { 
    display: block;
    padding: 1rem 1.1rem;
    color: #eef6ff; 
    text-decoration: none; 
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover { 
    background-color: #1e3a4d; 
    color: #ffffff;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(20,40,55,0.95);
    backdrop-filter: blur(6px);
    min-width: 220px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.55);
    z-index: 1000;
    border: 1px solid rgba(100,160,200,0.25);
    border-radius: 6px;
    overflow: hidden;
}

.dropdown-content a {
    color: #d9ecfb;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.92rem;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: linear-gradient(90deg, rgba(0,120,170,0.35), rgba(0,160,210,0.20));
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown > a::after {
    content: " ▼";
    font-size: 0.8em;
    margin-left: 5px;
}

/* Language Toggle Styles */
.language-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(20,40,55,0.85);
    border: 1px solid rgba(100,160,200,0.3);
    border-radius: 24px;
    padding: 6px 7px;
    display: flex;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.lang-btn {
    padding: 8px 12px;
    background: transparent;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: bold;
}

.lang-btn.active {
    background: linear-gradient(135deg, #0077a6, #0099cc);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15), 0 0 8px -2px rgba(0,170,230,0.8);
}

.lang-btn:hover {
    background: #555;
}

/* Language Content Visibility */
.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}

main { 
    padding: 1rem; /* Reduced padding for smaller screens initially */
    position: relative;
    z-index: 1;
}

footer { 
    background: rgba(25,45,65,0.90); 
    color: #e8f0f8; 
    text-align: center; 
    padding: 1rem; 
    margin-top: 2rem; 
    border-top: 1px solid rgba(100,160,200,0.35);
}

h1, h2 { 
    text-align: center;
    color: #f5f9fc;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

h3 {
    color: #d4e4f0 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.placeholder { 
    border: 1px solid rgba(100,160,200,0.3); 
    padding: 1.1rem 1.2rem; 
    margin-bottom: 1.2rem; 
    background: linear-gradient(145deg, rgba(28,48,65,0.90), rgba(20,35,48,0.85));
    color: #e8f0f8; 
    text-align: justify; /* Fully align the text */
    border-radius: 8px;
    box-shadow: 0 4px 14px -4px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.06);
}

/* Contact Form Specific */
form label { 
    display: block; 
    margin-bottom: 0.5rem; 
}

form input,
form textarea {
    width: 100%; 
    padding: 0.5rem; 
    margin-bottom: 1rem; 
    border: 1px solid #ccc; 
    box-sizing: border-box; /* Ensures padding doesn't add to width */
}

form button { 
    background-color: #333; 
    color: white; 
    padding: 0.7rem 1.5rem; 
    border: none; 
    cursor: pointer; 
}

form button:hover { 
    background-color: #555; 
}

/* Responsive Design - Media Queries */

/* Medium screens (tablets, small desktops) */
@media (min-width: 600px) {
    nav ul li {
        display: inline-block; /* Horizontal nav for larger screens */
    }
    nav ul li a {
        display: block;
    }
    main {
        padding: 2rem; /* Restore larger padding */
    }
}

/* Small screens (mobile phones) */
@media (max-width: 599px) {
    nav ul {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    nav ul li {
        display: block; /* Stack links vertically */
        width: 100%;
        text-align: center;
    }
    nav ul li a {
        padding: 0.8rem;
        border-bottom: 1px solid #444;
    }
    nav ul li:last-child a {
        border-bottom: none;
    }
    
    /* Mobile dropdown adjustments */
    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        background-color: #555;
        margin: 0;
        border-radius: 0;
    }
    
    .dropdown:hover .dropdown-content {
        display: block;
    }
    
    .dropdown-content a {
        padding-left: 2rem;
        background-color: #555;
    }
    
    .dropdown-content a:hover {
        background-color: #666;
    }
    
    /* Mobile language toggle */
    .language-toggle {
        position: static;
        margin: 10px auto;
        width: fit-content;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}

/* Ship detection demo styles */
#ship-image {
    display: block;
    margin-bottom: 15px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

#process-btn {
    transition: background-color 0.3s;
}

#process-btn:hover {
    background-color: #003d66;
}

#process-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.status-info {
    color: #005580;
}

.status-success {
    color: #28a745;
}

.status-error {
    color: #dc3545;
}

#original-img, #processed-img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none; /* Initially hidden */
}
