/* General Styling */
body {
    font-family: 'IBM Plex Mono', monospace;
    background-color: #212737;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #ffffff;
    overflow-y: auto; /* Allow scrolling on mobile */
}

/* Main Container */
.main-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    max-width: 1100px; /* Reduced max width */
    width: 100%;
    padding: 15px;
    gap: 15px; /* Reduced gap between sections */
    overflow-y: visible; /* Allow internal scrolling */
}

/* Left Section */
.left-section {
    flex: 1;
    background-color: #2c313c;
    border-radius: 10px;
    padding: 20px; /* Reduced padding */
    display: flex; /* Make it a flex container */
    flex-direction: column; /* Stack items vertically */
    justify-content: center; /* Center items vertically */
    align-items: center; /* Center items horizontally */
    text-align: center; /* Center-align text */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.company-logo {
    max-width: 85%; /* Slightly smaller logo size */
    height: auto;
    margin-bottom: 20px; /* Reduced margin */
    border-radius: 8px; /* Reduced border radius */
    border: 2px solid #4facfe;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.left-section h2 {
    color: #4facfe;
    font-size: 1.5rem; /* Reduced font size */
    margin-bottom: 15px; /* Reduced margin */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.left-section p {
    font-size: 0.9rem; /* Reduced font size */
    line-height: 1.4; /* Tighter line height */
    color: #cfd3d8;
    margin-bottom: 15px;
}

/* Right Section */
.right-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Reduced gap between sections */
}

.container {
    background: linear-gradient(135deg, #2a2f3a, #333b49);
    border-radius: 10px; /* Reduced border radius */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 25px; /* Reduced padding */
    overflow-y: auto; /* Scroll only if content overflows */
    text-align: center; /* Center-align text inside the container */
}

/* Header */
h1 {
    color: #4facfe;
    font-size: 1.8rem; /* Reduced font size */
    margin-bottom: 20px; /* Reduced margin */
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
}

/* Form Styling */
form {
    margin-bottom: 20px; /* Reduced margin */
    display: flex;
    flex-direction: column;
    gap: 15px; /* Reduced gap */
}

label {
    font-size: 1rem; /* Reduced font size */
    font-weight: bold;
    margin-bottom: 8px; /* Reduced margin */
    text-align: center; /* Center-align label text */
    color: #cfd3d8;
}

textarea {
    width: 100%;
    padding: 10px; /* Reduced padding */
    font-size: 0.9rem; /* Reduced font size */
    color: #ffffff;
    background-color: #1b1f26;
    border: 1px solid #4facfe;
    border-radius: 8px;
    resize: none;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

button {
    width: 100%;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border: none;
    color: white;
    padding: 12px; /* Reduced padding */
    font-size: 0.9rem; /* Reduced font size */
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

/* Context Section */
.context {
    padding: 15px; /* Reduced padding */
    border: 1px solid #4facfe;
    border-radius: 10px; /* Reduced border radius */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center; /* Center-align the entire context section */
}

.context h3 {
    color: #4facfe;
    font-size: 1.2rem; /* Reduced font size */
    margin-bottom: 10px; /* Reduced margin */
}

.language-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* Adjusted grid size */
    gap: 10px; /* Reduced gap */
    background-color: #1b1f26;
    padding: 15px; /* Reduced padding */
    border-radius: 8px;
}

.language-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Reduced gap */
    background-color: #2c313c;
    padding: 10px; /* Reduced padding */
    border-radius: 5px;
    font-size: 0.9rem; /* Reduced font size */
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.language-item:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.flag {
    font-size: 1rem; /* Reduced font size */
}

/* Prediction Result Styling */
.result {
    font-family: 'IBM Plex Mono';
    margin-top: 20px; /* Add spacing above */
    margin-bottom: 30px; /* Add light gap below */
    padding: 20px;
    border-radius: 15px; /* Smooth rounded corners */
    background: linear-gradient(135deg, #2a2f3a, #333b49); /* Subtle background gradient */
    border: 2px solid transparent; /* Gradient border placeholder */
    background-clip: padding-box; /* Ensure border gradient does not bleed */
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3); /* Add depth */
}

/* Gradient Border Effect */
.result::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    z-index: -1;
    background: linear-gradient(135deg, #4facfe, #00f2fe); /* Gradient border */
    border-radius: 18px; /* Match the result box border-radius */
}

/* Highlighted Text Styling */
.result h2 {
    font-size: 1.8rem; /* Larger font size for language */
    color: #4facfe; /* Highlighted color */
    text-shadow: 0 0 8px rgba(79, 172, 254, 0.5); /* Glow effect */
    margin: 0;
}

.result p {
    font-size: 1rem; /* Smaller font size for confidence level */
    color: #cfd3d8; /* Light text color */
    margin-top: 10px; /* Space below h2 */
    font-style: italic; /* Italicize the confidence text */
}

/* Icon Styling */
.result-icon {
    font-size: 2rem; /* Icon size */
    color: #4facfe;
    margin-bottom: 10px; /* Space below icon */
    animation: pulse 2s infinite; /* Optional pulse animation */
}

/* Icon Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}


/* Company Text Section */
.company-info {
    font-size: 1rem; /* Base font size */
    color: #4facfe; /* Glowing text color */
    text-shadow: 0 0 5px #4facfe, 0 0 10px #4facfe, 0 0 15px #00f2fe, 0 0 20px #00f2fe;
    font-weight: bold; /* Make the text bold */
    display: inline-block;
    margin-top: 20px; /* Add spacing above */
    padding: 10px 15px; /* Add some padding */
    border: 2px solid #4facfe; /* Border around the text */
    border-radius: 8px; /* Rounded corners */
    animation: glow 1.5s infinite alternate; /* Glowing animation */
}

/* Prediction Container */
.prediction-container {
    text-align: center; /* Center all content */
    padding: 30px;
    background: linear-gradient(135deg, #2a2f3a, #333b49); /* Subtle gradient background */
    border-radius: 15px; /* Rounded corners */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); /* Drop shadow for depth */
    max-width: 600px; /* Limit width */
    width: 90%; /* Responsive */
}

/* Error Image */
.error-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px; /* Optional rounded corners */
    margin-bottom: 20px; /* Space below the image */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Add depth */
}

/* Back to Previous Page Button */
.error-btn {
    display: inline-block;
    padding: 12px 20px;
    font-size: 1rem;
    color: #ffffff; /* White text */
    background: linear-gradient(135deg, #4facfe, #00f2fe); /* Gradient button */
    border: none;
    border-radius: 8px; /* Rounded corners */
    text-decoration: none; /* Remove underline */
    font-weight: bold; /* Bold text */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Add shadow */
}

/* Button Hover Effect */
.error-btn:hover {
    transform: translateY(-3px); /* Slight lift */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); /* Enhanced shadow on hover */
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem; /* Slightly smaller heading */
    }

    p {
        font-size: 0.9rem; /* Slightly smaller text */
    }

    .error-btn {
        padding: 10px 18px; /* Adjust button padding */
        font-size: 0.9rem; /* Adjust button font size */
    }
}



/* Glowing Animation */
@keyframes glow {
    0% {
        text-shadow: 0 0 5px #4facfe, 0 0 10px #4facfe, 0 0 15px #00f2fe, 0 0 20px #00f2fe;
    }
    100% {
        text-shadow: 0 0 10px #00f2fe, 0 0 20px #00f2fe, 0 0 30px #00f2fe, 0 0 40px #00f2fe;
    }
}
