/* ============================================
   IKLAN & MODAL STYLES - GOLD THEME
   DENGAN PERBAIKAN DROPDOWN
============================================ */

/* IKLAN DESKTOP (Header) */
.website-ad.desktop-ad {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: white;
    padding: 12px 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid #FFD700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
    z-index: 1000;
    animation: slideDown 0.5s ease;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
}

/* IKLAN MOBILE (Footer) */
.website-ad.mobile-ad {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: white;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.3);
    display: none;
    animation: fadeIn 0.5s ease;
}

/* Konten iklan */
.ad-content {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
    width: 100%;
    justify-content: center;
}

.ad-icon {
    font-size: 1.5rem;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.ad-text {
    flex: 1;
    text-align: center;
}

.ad-text strong {
    font-size: 1.1rem;
    display: block;
    color: #FFD700;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.ad-text span {
    font-size: 0.95rem;
    opacity: 0.9;
    color: #e0e0e0;
}

.ad-button {
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #000;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.ad-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.ad-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #FFE44D, #FFCA28);
}

.ad-button:hover::before {
    left: 100%;
}

/* Tombol close hanya di desktop */
.ad-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-close:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============= MODAL STYLES ============= */
/* Modal Container */
#adModal .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    background: #1a1a1a;
}

/* Modal Header */
.ad-modal-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: #FFD700;
    border-bottom: 2px solid #FFD700;
    padding: 1.5rem;
    position: relative;
}

.ad-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
}

.ad-modal-title {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.ad-modal-title h5 {
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.ad-modal-title i {
    font-size: 1.8rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.btn-close-white:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Modal Body */
.ad-modal-body {
    padding: 2rem;
    background: #1a1a1a;
    color: #e0e0e0;
}

.modal-subtitle {
    color: #FFD700;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-style: italic;
    opacity: 0.9;
}

/* Form Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    color: #FFD700;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.form-label i {
    color: #FFD700;
}

/* Input Fields */
.input-with-icon {
    position: relative;
}

.ad-input {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 12px 45px 12px 15px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    height: 50px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.ad-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    color: #fff;
    outline: none;
}

.ad-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Input Icons */
.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #FFD700;
    font-size: 1rem;
    pointer-events: none;
}

/* ============= DROPDOWN CUSTOM STYLES ============= */
/* Style khusus untuk dropdown select */
.ad-dropdown-select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid rgba(255, 215, 0, 0.2) !important;
    color: #fff !important;
}

/* Style untuk dropdown options */
.ad-dropdown-option {
    background: #2a2a2a !important;
    color: #fff !important;
    padding: 10px 15px !important;
}

.ad-dropdown-option:hover,
.ad-dropdown-option:focus {
    background: #3a3a3a !important;
    color: #FFD700 !important;
}

/* Untuk select yang terbuka */
.ad-input:focus option {
    background: #2a2a2a !important;
    color: #fff !important;
}

/* Custom dropdown arrow */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #FFD700;
    pointer-events: none;
    z-index: 2;
}

/* Override Bootstrap dropdown styles */
select.ad-input option {
    background-color: #2a2a2a !important;
    color: #fff !important;
    padding: 12px !important;
    font-size: 1rem !important;
}

select.ad-input option:hover,
select.ad-input option:focus,
select.ad-input option:checked {
    background-color: #3a3a3a !important;
    color: #FFD700 !important;
}

select.ad-input option[value=""] {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Untuk browser modern yang support pseudo-elements */
select.ad-input::-ms-expand {
    display: none; /* Hide default arrow in IE */
}

/* Firefox specific */
@-moz-document url-prefix() {
    select.ad-input {
        text-indent: 0.01px;
        text-overflow: '';
        padding-right: 45px;
    }
    
    select.ad-input option {
        background-color: #2a2a2a;
        color: #fff;
    }
    
    select.ad-input option:hover {
        background-color: #3a3a3a;
    }
}

/* Safari/Chrome specific */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select.ad-input {
        padding-right: 45px;
    }
    
    select.ad-input option {
        background-color: #2a2a2a;
        color: #fff;
    }
    
    select.ad-input option:hover {
        background-color: #3a3a3a;
    }
}

/* Features List */
.ad-features-list {
    background: rgba(255, 215, 0, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 2rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.feature-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
    color: #FFD700;
}

.feature-header h6 {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

.feature-header i {
    font-size: 1.2rem;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.05);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateX(5px);
}

.feature-item i {
    color: #4CAF50;
    font-size: 0.9rem;
}

.feature-item span {
    font-size: 0.9rem;
    color: #e0e0e0;
}

/* Modal Footer */
.ad-modal-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    padding: 1.5rem;
    gap: 10px;
}

.ad-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ad-btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #FFD700;
    transform: translateY(-2px);
}

.ad-btn-primary {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    padding: 10px 30px;
    border-radius: 10px;
    font-weight: 700;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ad-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.ad-btn-primary:hover {
    background: linear-gradient(135deg, #34dc74, #17a085);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.ad-btn-primary:hover::before {
    left: 100%;
}

/* ============= RESPONSIVE BREAKPOINTS ============= */
@media (max-width: 768px) {
    /* Sembunyikan iklan desktop di mobile */
    .website-ad.desktop-ad {
        display: none !important;
    }
    
    /* Tampilkan iklan mobile di footer */
    .website-ad.mobile-ad {
        display: block !important;
        margin: 15px 10px;
    }
    
    .ad-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .ad-text strong {
        font-size: 1rem;
    }
    
    .ad-text span {
        font-size: 0.85rem;
    }
    
    .ad-button {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    /* Modal mobile optimization */
    #adModal .modal-dialog {
        margin: 10px;
    }
    
    #adModal .modal-content {
        border-radius: 15px;
    }
    
    .ad-modal-body {
        padding: 1.5rem;
    }
    
    .feature-item {
        padding: 6px;
    }
    
    .feature-item span {
        font-size: 0.85rem;
    }
    
    .ad-btn-primary,
    .ad-btn-secondary {
        padding: 8px 20px;
        font-size: 0.9rem;
        flex: 1;
    }
    
    /* Perbaikan dropdown untuk mobile */
    .ad-input {
        height: 48px;
        font-size: 0.95rem;
    }
    
    select.ad-input option {
        font-size: 0.95rem !important;
        padding: 10px !important;
    }
}

@media (min-width: 769px) {
    /* Sembunyikan iklan mobile di desktop */
    .website-ad.mobile-ad {
        display: none !important;
    }
    
    /* Modal desktop optimization */
    #adModal .modal-dialog {
        max-width: 500px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Already dark theme */
}

/* Validation styling */
.ad-input:invalid:not(:placeholder-shown) {
    border-color: #f44336;
}

.ad-input:valid:not(:placeholder-shown) {
    border-color: #4CAF50;
}

/* Loading animation untuk tombol */
.ad-btn-primary.loading {
    position: relative;
    color: transparent;
}

.ad-btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* JavaScript injected styles untuk dropdown */
.ad-dropdown-fixed {
    position: relative;
}

.ad-dropdown-fixed select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.ad-dropdown-fixed::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #FFD700;
    pointer-events: none;
    font-size: 0.8rem;
}