* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f8ff;
    color: #172b4d;
    font-family: Arial, sans-serif;
}

.ads-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #ffffff;
    border-bottom: 1px solid #e1eaf5;
}

.ads-header img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #d8eaff;
}

.ads-header h2 {
    margin: 0;
    font-size: 18px;
}

.ads-header p {
    margin: 5px 0 0;
    font-size: 12px;
    color: #718096;
}

.ads-container {
    max-width: 650px;
    margin: 20px auto;
    padding: 0 14px 90px;
}

.ads-intro {
    margin-bottom: 20px;
}

.ads-intro h1 {
    font-size: 23px;
    margin-bottom: 7px;
}

.ads-intro p,
.preview-section > p {
    color: #718096;
    font-size: 13px;
    line-height: 1.5;
}

#adForm {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 3px 15px rgba(30, 90, 150, 0.06);
}

.form-section {
    margin-bottom: 20px;
}

.form-section label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 9px;
}

.form-section select,
.form-section textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid #d6e2f0;
    border-radius: 9px;
    outline: none;
    background: #ffffff;
    color: #172b4d;
    font-size: 14px;
}

.form-section select:focus,
.form-section textarea:focus {
    border-color: #1688f8;
}

.form-section textarea {
    resize: vertical;
    min-height: 110px;
}

#adImage {
    display: none;
}

.upload-box {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 145px;
    border: 2px dashed #9bcaff;
    border-radius: 12px;
    background: #f3f9ff;
    cursor: pointer;
    text-align: center;
}

.upload-icon {
    font-size: 35px;
    color: #1688f8;
    margin-bottom: 5px;
}

.upload-box strong {
    color: #1688f8;
}

.upload-box small {
    margin-top: 7px;
    color: #718096;
    font-weight: normal;
}

.image-preview {
    display: none;
    margin-top: 12px;
}

.image-preview img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 10px;
    background: #edf4fc;
}

.character-count {
    display: block;
    margin-top: 7px;
    color: #718096;
    font-size: 11px;
}

.payment-box {
    padding: 17px;
    border-radius: 12px;
    background: #eff7ff;
    border: 1px solid #c9e2ff;
    margin: 25px 0;
}

.payment-box h3 {
    margin: 0;
    font-size: 17px;
}

.payment-price {
    color: #0875df;
    font-size: 30px;
    font-weight: 800;
    margin-top: 13px;
}

.payment-duration {
    font-size: 13px;
    color: #50647e;
}

.payment-details {
    padding: 13px;
    margin-top: 15px;
    background: #ffffff;
    border-radius: 9px;
}

.payment-details p {
    font-size: 13px;
}

.payment-number {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 11px;
    background: #f2f7ff;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 800;
}

.payment-number button {
    border: none;
    background: #1688f8;
    color: white;
    padding: 8px 13px;
    border-radius: 6px;
    cursor: pointer;
}

.payment-note {
    color: #50647e;
    line-height: 1.6;
}

.post-ad-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 9px;
    background: #1688f8;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.post-ad-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.approval-note {
    text-align: center;
    font-size: 12px;
    color: #718096;
    line-height: 1.6;
    margin-top: 13px;
}

.form-message {
    display: none;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.form-message.success {
    display: block;
    background: #e5f9ed;
    color: #147a3d;
}

.form-message.error {
    display: block;
    background: #fff0f0;
    color: #c62828;
}

.preview-section {
    margin-top: 30px;
}

.preview-section h2 {
    font-size: 19px;
}

.ad-preview-card {
    overflow: hidden;
    background: #ffffff;
    border-radius: 13px;
    box-shadow: 0 3px 15px rgba(30, 90, 150, 0.07);
}

.preview-category {
    padding: 12px 14px;
    font-size: 12px;
    font-weight: bold;
    color: #1688f8;
}

.card-preview-image {
    display: none;
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    background: #edf4fc;
}

.preview-content {
    padding: 15px;
}

.preview-content p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.6;
    font-size: 14px;
}

.preview-label {
    color: #1688f8;
    font-size: 11px;
    font-weight: bold;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 13px 4px;
    background: #ffffff;
    border-top: 1px solid #e1eaf5;
    z-index: 100;
}

.bottom-nav a {
    color: #53657b;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

@media (max-width: 380px) {
    .ads-header h2 {
        font-size: 16px;
    }

    .ads-container {
        padding-left: 9px;
        padding-right: 9px;
    }

    #adForm {
        padding: 13px;
    }

    .payment-price {
        font-size: 26px;
    }
}