/* /assets/css/main.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css');

:root {
    --bg-body: #F3F3F5;
    --bg-white: #FFFFFF;
    --text-dark: #33333B;
    --text-grey: #47474F;
    --brand-red: #E5322D;
    --brand-blue: #4A7AAB;
    --brand-green: #8FBC5D;
    --border-color: #EAEAEA;
    --container-width: 1100px;
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }

body {
    background-color: var(--bg-body);
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

/* --- HEADER --- */
.header {
    background: var(--bg-white);
    height: 70px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.navbar { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.brand { 
    display: flex; align-items: center; gap: 8px; 
    font-weight: 800; font-size: 24px; color: var(--text-dark); letter-spacing: -0.5px; 
}
.brand i { color: var(--brand-red); font-size: 28px; }

.menu-links { display: flex; gap: 25px; }
.menu-links a { font-weight: 600; font-size: 15px; color: var(--text-dark); opacity: 0.8; }
.menu-links a:hover { color: var(--brand-red); opacity: 1; }

.btn-signup { 
    background-color: var(--brand-red); color: #fff; padding: 10px 24px; 
    border-radius: 6px; font-weight: 600; font-size: 14px; transition: 0.2s;
}
.btn-signup:hover { background-color: #c92b27; transform: translateY(-1px); }

/* --- MAIN CONTENT & TOOLS --- */
.main-content { margin-top: 70px; padding-bottom: 60px; flex: 1; display: flex; flex-direction: column; align-items: center; }

.tool-box {
    background: var(--bg-white);
    width: 100%;
    max-width: 900px;
    margin-top: 40px;
    padding: 50px;
    border-radius: var(--radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.tool-title { font-size: 32px; font-weight: 800; color: var(--text-dark); margin-bottom: 10px; }
.tool-desc { font-size: 16px; color: var(--text-grey); margin-bottom: 30px; }

/* Inputs */
.input-clean {
    width: 100%; padding: 15px; border: 2px solid var(--border-color);
    border-radius: 8px; font-size: 16px; transition: 0.3s;
}
.input-clean:focus { border-color: var(--brand-blue); }

/* Buttons */
.btn-action {
    background: var(--brand-blue); color: #fff; border: none; padding: 14px 40px;
    border-radius: 8px; font-size: 18px; font-weight: 700; cursor: pointer; transition: 0.2s;
    display: inline-flex; align-items: center; gap: 10px;
}
.btn-action:hover { opacity: 0.9; transform: translateY(-2px); }

/* --- FOOTER --- */
.footer { background: var(--bg-white); border-top: 1px solid var(--border-color); padding: 50px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 40px; }
.footer-col h4 { font-size: 16px; font-weight: 700; color: var(--text-dark); margin-bottom: 20px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: var(--text-grey); }
.footer-col a:hover { color: var(--brand-red); }
.copyright { border-top: 1px solid #eee; padding-top: 20px; text-align: center; font-size: 13px; color: #999; }

/* Responsive */
@media (max-width: 900px) {
    .menu-links, .auth-buttons { display: none; }
    .header { justify-content: center; }
    .tool-box { padding: 30px 20px; margin-top: 20px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* --- MODALS & POPUPS (Custom Styling) --- */

/* Modal Overlay/Background */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
    align-items: center;
    justify-content: center;
}

/* Show modal when Bootstrap adds 'show' class */
.modal.show {
    display: flex !important;
}

.modal-dialog {
    width: 100%;
    max-width: 400px;
    margin: 20px;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: var(--bg-white);
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px !important; /* Rounded Corners */
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    outline: 0;
    padding: 10px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header.border-0 {
    border-bottom: none;
}

.modal-title {
    margin: 0;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-dark);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 20px;
    text-align: center;
}

/* Close Button (X) */
.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    opacity: 0.5;
    cursor: pointer;
}
.btn-close:hover { opacity: 1; }

/* Buttons inside Modal */
.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
}

.btn-dark {
    background-color: #333;
    color: #fff;
    border: 1px solid #333;
    width: 100%;
    display: block;
    text-align: center;
    margin-top: 15px;
    transition: 0.2s;
}
.btn-dark:hover { background-color: #000; }

.btn-secondary {
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
    width: 100%;
    cursor: not-allowed;
}

.btn-success {
    background-color: var(--brand-green) !important;
    color: white !important;
    border-color: var(--brand-green) !important;
    cursor: pointer !important;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-grey); }
.small { font-size: 0.875em; }
.mb-3 { margin-bottom: 1rem; }
.w-100 { width: 100%; }

/* Spinner Animation for Ad Modal */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
    color: var(--brand-blue);
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}