/* public/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    /* Using the background from your first provided image */
    background: linear-gradient(rgba(10, 5, 15, 0.7), rgba(10, 5, 15, 0.7)), url('/background.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #e0e0e0;
    margin: 0;
    /* Padding-top is no longer needed as there's no main content to push down */
}

/* --- NEW TOP MENU BAR --- */
#top-menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: rgba(15, 15, 17, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #2a2a2e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-sizing: border-box;
}

.menu-group-left, .menu-group-center, .menu-group-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

#top-menu-bar .brand {
    font-weight: 500;
    font-size: 1.3rem;
    color: #fff;
}

#top-menu-bar input[type="text"] {
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent; /* Hidden by default */
    color: #e0e0e0;
    padding: 6px 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
    width: 200px;
    border-radius: 0; /* Flat look */
}
#top-menu-bar input#description {
    width: 300px;
}

#top-menu-bar input[type="text"]:focus {
    outline: none;
    border-bottom-color: #777;
}
#top-menu-bar input[type="text"]::placeholder {
    color: #888;
}

#credits-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.buy-credits-btn, #generate-menu-btn {
    background-color: #2a2a2e;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.buy-credits-btn:hover:not(:disabled), #generate-menu-btn:hover:not(:disabled) {
    background-color: #3a3a3e;
    border-color: #666;
}
.buy-credits-btn:disabled, #generate-menu-btn:disabled {
    cursor: not-allowed;
    background-color: #222;
    color: #666;
    border-color: #333;
}

#credit-display {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background: #2a2a2e;
    padding: 6px 12px;
    border-radius: 6px;
}

#profile-container {
    position: relative;
}

#profile-button {
    background: none;
    border: 1px solid #444;
    color: #e0e0e0;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
#profile-button:hover {
    background-color: #2a2a2e;
}
#profile-button img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

#profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 160px;
}
#profile-dropdown.show { display: block; }
#profile-dropdown a {
    color: #e0e0e0;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}
#profile-dropdown a:hover {
    background-color: #007bff;
}


/* --- NEW STATUS POPUP --- */
#status-popup {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 25px;
    background-color: #2a2a2e;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    font-size: 0.95rem;
}
#status-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
#status-popup.error {
    background-color: #b03d3d;
}
#status-popup.success {
    background-color: #3d9e68;
}
#status-popup a {
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
}


/* --- STYLES FOR MY-WEBSITES PAGE (and previously index.html) --- */
.container {
    padding: 2.5rem 3.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #1e1e1e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}
.container h1 {
    color: #ffffff;
    margin-bottom: 2rem;
    font-size: 2rem;
}
#websites-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
    text-align: left;
}
.website-card {
    background-color: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}
.website-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.website-card .delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #bbb;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.website-card .delete-btn:hover {
    color: #ff7070;
}

/* Add-slot card styles */
.add-slot-card { text-align: center; display: grid; gap: 0.5rem; }
.add-slot-card .add-slot-btn {
    position: absolute; top: 8px; right: 8px;
    background: transparent; border: 1px solid #666; color: #bbb;
    font-size: 18px; width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
}
.add-slot-card .add-slot-btn:hover { color: #9cff9c; border-color: #9cff9c; }
.website-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #fff;
}
.website-card p { margin: 0; color: #b0b0b0; }
.website-card .card-actions { margin-top: 1rem; }
.button-link {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 0.6rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s;
}
.button-link:hover { background-color: #0056b3; }

/* --- Generator Hero (front page) --- */
.generator-hero {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background: radial-gradient(800px 400px at 50% -20%, rgba(0,123,255,0.12), transparent),
                radial-gradient(600px 300px at 10% 120%, rgba(61,158,104,0.12), transparent);
}
.generator-card {
    width: 100%;
    max-width: 680px;
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.45);
    padding: 1.8rem;
    text-align: center;
}
.generator-card h1 { color: #fff; margin: 0 0 0.25rem 0; font-size: 1.9rem; }
.generator-card .subtitle { color: #bdbdbd; margin: 0 0 1.2rem 0; }
.generator-card .hint { color: #8a8a8a; margin-top: 0.9rem; font-size: 0.9rem; }
.generator-card .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem; /* more breathing room */
}
.generator-card input[type="text"] {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid #3a3a3a;
    background: #2a2a2a;
    color: #eaeaea;
    box-sizing: border-box;
}
.generator-card input[type="text"]::placeholder { color: #9b9b9b; }
.generator-card input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}
.generator-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s;
}
.generator-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 91, 187, 0.35); }
.generator-btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

@media (min-width: 720px) {
    .generator-card .form-grid { grid-template-columns: 1fr 1fr; column-gap: 1.4rem; row-gap: 1.1rem; }
    .generator-card .form-grid input#style { grid-column: 1 / -1; }
    .generator-card .form-grid .generator-btn { grid-column: 1 / -1; }
}

/* Empty website slot styles */
.empty-slot-card {
    border: 2px dashed #555;
    background: #262626;
    color: #bbb;
    text-align: center;
    display: grid;
    gap: 0.4rem;
    align-content: center;
    min-height: 130px;
}
.empty-slot-card h3 { color: #ddd; margin: 0.2rem 0; }
.empty-slot-card p { color: #a8a8a8; margin: 0; }
.empty-slot-card .empty-slot-icon {
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center;
    background: #2f2f2f; color: #8ad08a; border: 1px solid #3a3a3a;
    font-size: 20px; justify-self: center;
}

/* Generic modal styles for My Websites etc. */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: grid;
    place-items: center;
    z-index: 10010;
}
.modal-card {
    background: #2b2b2b;
    border: 1px solid #444;
    border-radius: 10px;
    width: 90%;
    max-width: 420px;
    padding: 1.2rem 1.4rem;
    color: #eee;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.modal-card h3 { margin: 0 0 0.6rem 0; color: #fff; }
.modal-card p { margin: 0 0 1rem 0; color: #cfcfcf; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; }
.btn { padding: 0.5rem 0.9rem; border-radius: 6px; border: 1px solid transparent; cursor: pointer; font-weight: 600; }
.btn-secondary { background: #444; color: #eee; border-color: #555; }
.btn-secondary:hover { background: #555; }
.btn-danger { background: #b03d3d; color: #fff; border-color: #b03d3d; }
.btn-danger:hover { background: #b64b4b; }
