/* assets/style.css */

/* Global Reset and Modern Font */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Navigation Bar (Header Nav) --- */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    position: sticky; 
    top: 0;
    z-index: 1000;
}

.nav-brand a {
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
    text-decoration: none;
}

.nav-links a {
    margin-left: 20px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

/* --- Main Layout and Content Header --- */
.main-content {
    /* *** KEY FIX 1: Max-width and margin: auto centers the container *** */
    max-width: 900px; /* Increased width slightly for a modern, wider look */
    width: 100%;
    margin: 0 auto; /* This centers the container horizontally! */
    
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    box-sizing: border-box; /* Ensures padding is included in the 100% width */
}

/* The .container class is now redundant as main-content handles centering, 
   but we'll adjust it for consistency in the EJS files. */
.container {
    width: 100%;
    padding: 0; 
    text-align: center;
}

header {
    width: 100%;
    padding: 20px 0;
}
header h1 {
    color: #333;
    margin-bottom: 5px;
    font-size: 2.2em;
}

header p {
    color: #666;
    margin-bottom: 30px;
}

/* --- Card for Input --- */
.card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 20px 0; 
    background-color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ensure it spans the full width of the main-content */
    box-sizing: border-box;
}

input[type="url"] {
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="url"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

button {
    padding: 14px 25px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.1s;
}

button:hover {
    background-color: #0056b3;
}
button:active {
    transform: scale(0.99);
}

/* --- Result Box Styling --- */
.result-box {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%; /* Ensure it spans the full width of the main-content */
    box-sizing: border-box;
}

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

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

.result-box a {
    flex-grow: 1;
    color: #007bff;
    word-break: break-all;
    font-weight: 600;
}

.copy-btn {
    padding: 8px 15px;
    background-color: #28a745;
    font-size: 14px;
}
.copy-btn:hover {
    background-color: #1e7e34;
}


/* --- Info Sections (How It Works & Features) --- */
.info-section {
    width: 100%;
    padding: 40px 0;
    text-align: center;
    margin: 20px 0;
}

.info-section h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 30px;
}

/* How It Works Grid */
.step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.step-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.step-number {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 5px;
}

.step-card h3 {
    margin: 10px 0;
    font-size: 1.2em;
}

/* Features/Trust Badges */
.feature-section ul {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
    text-align: left;
}
.feature-section li {
    padding: 10px 0;
    border-bottom: 1px dotted #e0e0e0;
}
.feature-section li:last-child {
    border-bottom: none;
}

.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.badge {
    background-color: #e6f0ff;
    color: #007bff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Footer --- */
footer {
    padding: 20px;
    background-color: #333;
    color: #ccc;
    text-align: center;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto; 
}

footer a {
    color: #ccc;
    text-decoration: none;
    margin: 0 5px;
}

footer a:hover {
    color: #ffffff;
}

/* --- AdSense Placeholder Styling --- */
.ad-placeholder {
    width: 100%;
    background-color: #e9e9e9;
    color: #666;
    text-align: center;
    border: 1px dashed #ccc;
    font-size: 14px;
    margin: 20px 0;
    border-radius: 8px;
}
.banner-ad {
    height: 90px;
    line-height: 90px;
}
.content-ad {
    height: 250px;
    line-height: 250px;
}

/* --- Legal & Contact Page Styles (For consistency) --- */
.small-container {
    /* Centering applied here too for the small document pages */
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px; /* Add internal padding */
    box-sizing: border-box;
    text-align: left;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.document-content h2 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-top: 30px;
}

.document-content p {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 404 Page Specific */
.error-code {
    font-size: 80px;
    color: #dc3545;
    margin: 0;
}

/* assets/style.css (Add to the bottom) */

/* Styling for manual ad placement container */
.ad-placement-area {
    width: 100%;
    max-width: 728px; /* Standard leaderboard max width */
    margin: 25px auto; /* Centers the ad and adds vertical spacing */
    text-align: center;
}

/* Mobile adjustments */
@media (max-width: 900px) {
    .main-content {
        /* Reduce side padding on very small screens to maximize space */
        padding: 20px 10px; 
    }
}
@media (max-width: 600px) {
    .step-grid {
        grid-template-columns: 1fr; /* Stack steps on small screens */
    }
    .navbar {
        flex-direction: column;
    }
    .nav-links {
        margin-top: 10px;
    }
    .nav-links a {
        margin: 0 8px;
    }
}
