/* ============================================ */
/* AI MARKETING SUITE - VIBRANT FLOATING ICONS */
/* ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f4ff;
    min-height: 100vh;
    padding: 40px 20px;
    color: #1a1a2e;
    position: relative;
    overflow-x: hidden;
}

/* ============================================ */
/* FLOATING ICONS CONTAINER */
/* ============================================ */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.float-icon {
    position: absolute;
    font-size: 3.5rem;
    opacity: 0.85;
    animation: floatUp linear infinite;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}

/* Individual icon positions and timings */
.float-icon:nth-child(1)  { left: 5%;   font-size: 4rem;   animation-duration: 18s; animation-delay: 0s;    }
.float-icon:nth-child(2)  { left: 12%;  font-size: 3.2rem; animation-duration: 22s; animation-delay: -4s;   }
.float-icon:nth-child(3)  { left: 20%;  font-size: 4.5rem; animation-duration: 16s; animation-delay: -8s;   }
.float-icon:nth-child(4)  { left: 30%;  font-size: 3.8rem; animation-duration: 20s; animation-delay: -2s;   }
.float-icon:nth-child(5)  { left: 40%;  font-size: 3rem;   animation-duration: 25s; animation-delay: -10s;  }
.float-icon:nth-child(6)  { left: 50%;  font-size: 4.2rem; animation-duration: 19s; animation-delay: -6s;   }
.float-icon:nth-child(7)  { left: 60%;  font-size: 3.5rem; animation-duration: 23s; animation-delay: -14s;  }
.float-icon:nth-child(8)  { left: 70%;  font-size: 4rem;   animation-duration: 17s; animation-delay: -3s;   }
.float-icon:nth-child(9)  { left: 80%;  font-size: 3.2rem; animation-duration: 21s; animation-delay: -9s;   }
.float-icon:nth-child(10) { left: 88%;  font-size: 3.8rem; animation-duration: 24s; animation-delay: -7s;   }
.float-icon:nth-child(11) { left: 95%;  font-size: 3rem;   animation-duration: 15s; animation-delay: -12s;  }
.float-icon:nth-child(12) { left: 25%;  font-size: 3.5rem; animation-duration: 20s; animation-delay: -16s;  }
.float-icon:nth-child(13) { left: 45%;  font-size: 4rem;   animation-duration: 18s; animation-delay: -5s;   }
.float-icon:nth-child(14) { left: 65%;  font-size: 3.2rem; animation-duration: 22s; animation-delay: -11s;  }
.float-icon:nth-child(15) { left: 75%;  font-size: 4.5rem; animation-duration: 26s; animation-delay: -1s;   }

@keyframes floatUp {
    0% {
        transform: translateY(110vh) rotate(0deg) scale(0.9);
        opacity: 0;
    }
    8% {
        opacity: 0.85;
    }
    50% {
        transform: translateY(50vh) rotate(15deg) scale(1.1);
        opacity: 0.9;
    }
    92% {
        opacity: 0.85;
    }
    100% {
        transform: translateY(-10vh) rotate(30deg) scale(0.9);
        opacity: 0;
    }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ============================================ */
/* HEADER */
/* ============================================ */
header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 12px;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: -0.5px;
}

header p {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 400;
}

/* ============================================ */
/* NAVIGATION */
/* ============================================ */
.page-nav {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
    background: white;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.page-nav a {
    padding: 10px 20px;
    background: transparent;
    border-radius: 8px;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.15s ease;
}

.page-nav a:hover {
    background: #f0f4ff;
    color: #1a1a2e;
}

.page-nav a.active {
    background: #2383e2;
    color: white;
    box-shadow: 0 2px 8px rgba(35, 131, 226, 0.3);
}

/* ============================================ */
/* FORM CONTAINER */
/* ============================================ */
.form-container {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    margin-bottom: 30px;
    border: 1px solid #e8eaf0;
}

/* ============================================ */
/* FORM ELEMENTS */
/* ============================================ */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e4ef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.15s ease;
    background: white;
    color: #1a1a2e;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2383e2;
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ba3b8;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 0.875rem;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ============================================ */
/* BUTTONS */
/* ============================================ */
.btn-primary,
button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    background: #2383e2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(35, 131, 226, 0.3);
}

.btn-primary:hover:not(:disabled),
button[type="submit"]:hover:not(:disabled) {
    background: #1a6ec7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 131, 226, 0.4);
}

.btn-primary:active,
button[type="submit"]:active {
    transform: scale(0.98);
}

.btn-primary:disabled,
button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-text {
    display: inline;
}

.btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-secondary {
    background: #16a34a !important;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3) !important;
}

.btn-secondary:hover:not(:disabled) {
    background: #15803d !important;
}

.btn-copy {
    padding: 10px 18px;
    background: #f0f4ff;
    color: #1a1a2e;
    border: 1.5px solid #e0e4ef;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn-copy:hover {
    background: #e0e8ff;
    border-color: #2383e2;
    color: #2383e2;
}

/* ============================================ */
/* LOADING SPINNER - HIDDEN BY DEFAULT */
/* ============================================ */
.loading {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    margin: 20px 0;
    border: 1px solid #e8eaf0;
    display: none;
}

.loading.active {
    display: block;
}

.spinner {
    border: 3px solid #f0f4ff;
    border-top: 3px solid #2383e2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0%  { transform: rotate(0deg); }
    100%{ transform: rotate(360deg); }
}

.loading p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* ============================================ */
/* RESULTS CONTAINER */
/* ============================================ */
.result-container {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid #e8eaf0;
}

.result-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid #e8eaf0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.result-header h2 {
    color: #1a1a2e;
    font-size: 1.5rem;
    font-weight: 700;
}

.article-content {
    line-height: 1.7;
    color: #1a1a2e;
    white-space: pre-wrap;
    margin-bottom: 20px;
    padding: 24px;
    background: #f8faff;
    border-radius: 10px;
    max-height: 600px;
    overflow-y: auto;
    border: 1.5px solid #e8eaf0;
    font-size: 0.97rem;
}

.article-content h2 {
    font-size: 1.6em;
    font-weight: 700;
    margin: 24px 0 12px 0;
    color: #1a1a2e;
}

.article-content h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: #1a1a2e;
}

.article-content p {
    margin: 12px 0;
    line-height: 1.7;
}

.article-content strong {
    font-weight: 600;
}

.article-content::-webkit-scrollbar { width: 6px; }
.article-content::-webkit-scrollbar-track { background: transparent; }
.article-content::-webkit-scrollbar-thumb { background: #d0d5e8; border-radius: 4px; }
.article-content::-webkit-scrollbar-thumb:hover { background: #a0a8c8; }

/* ============================================ */
/* ERROR MESSAGES */
/* ============================================ */
.error {
    background: #fff1f2;
    color: #be123c;
    padding: 14px 16px;
    border-radius: 8px;
    margin: 12px 0;
    display: none;
    border: 1.5px solid #fecdd3;
    font-size: 0.95rem;
}

.error.active {
    display: block;
}

/* ============================================ */
/* UTILITY */
/* ============================================ */
.hidden {
    display: none !important;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 768px) {
    body { padding: 20px 15px; }
    header h1 { font-size: 2.2rem; }
    header p { font-size: 1rem; }
    .page-nav { flex-direction: column; max-width: 100%; }
    .page-nav a { width: 100%; text-align: center; }
    .form-container, .result-container { padding: 24px; }
    .result-header { flex-direction: column; align-items: flex-start; }
    .btn-copy { width: 100%; }
    .float-icon { font-size: 2.5rem !important; }
}

@media (max-width: 480px) {
    body { padding: 15px 10px; }
    header h1 { font-size: 1.9rem; }
    .form-container, .result-container { padding: 20px; }
    .article-content { padding: 18px; }
    .float-icon { font-size: 2rem !important; }
}