:root {
    --primary: #F0B90B;
    --primary-dark: #B38C00;
    --secondary: #1E2026;
    --secondary-light: #2B3139;
    --light: #EAECEF;
    --dark: #0B0E11;
    --success: #02C076;
    --danger: #F6465D;
    --warning: #F0B90B;
    --info: #2775CA;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--secondary);
    color: var(--light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--secondary);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-bottom: 2px solid var(--primary);
}

header h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.logo-yellow {
    color: var(--primary);
}

.logo-black {
    color: var(--light);
}

.tagline {
    text-align: center;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--secondary-light);
    flex-wrap: wrap;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    background-color: var(--secondary-light);
    border: none;
    transition: 0.3s;
    font-size: 16px;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    margin-bottom: 5px;
    color: var(--light);
}

.tab:hover {
    background-color: var(--primary-dark);
    color: white;
}

.tab.active {
    background-color: var(--primary);
    color: var(--dark);
    font-weight: bold;
}

.tab-content {
    display: none;
    padding: 20px;
    background-color: var(--secondary-light);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--primary);
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--secondary);
    border-radius: 4px;
    font-size: 16px;
    background-color: var(--secondary);
    color: var(--light);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

button {
    background-color: var(--primary);
    color: var(--dark);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    font-weight: bold;
}

button:hover {
    background-color: var(--primary-dark);
    color: white;
}

.generate-btn {
    background-color: var(--primary);
    color: var(--dark);
    font-weight: bold;
    padding: 12px 24px;
    font-size: 18px;
}

.generate-btn:hover {
    background-color: var(--primary-dark);
    color: white;
}

.preview-container {
    margin-top: 30px;
    border: 1px dashed var(--primary);
    padding: 20px;
    background-color: var(--secondary);
    position: relative;
}

.preview-title {
    position: absolute;
    top: -12px;
    left: 20px;
    background-color: var(--secondary);
    padding: 0 10px;
    font-weight: bold;
    color: var(--primary);
}

.preview-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.crop-btn, .clear-btn {
    flex: 1;
}

.clear-btn {
    background-color: var(--danger);
    color: white;
}

.clear-btn:hover {
    background-color: #D93A50;
}

.ad-preview {
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--primary);
}

.ad-code {
    margin-top: 20px;
}

.code-block {
    background-color: var(--secondary);
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 10px;
    border: 1px solid var(--primary);
    max-height: 200px;
    overflow-y: auto;
    color: var(--light);
}

.copy-btn {
    background-color: var(--secondary-light);
    margin-top: 10px;
    color: var(--primary);
}

.copy-btn:hover {
    background-color: var(--primary);
    color: var(--dark);
}

.ads-list {
    margin-top: 20px;
}

.ad-item {
    background-color: var(--secondary);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary);
}

.ad-item-actions button {
    margin-left: 5px;
    padding: 5px 10px;
    font-size: 14px;
}

.ad-item-actions .delete-btn {
    background-color: var(--danger);
    color: white;
}

.ad-item-actions .delete-btn:hover {
    background-color: #D93A50;
}

.ad-size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.ad-size-option {
    padding: 8px 15px;
    background-color: var(--secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--light);
    border: 1px solid var(--secondary-light);
}

.ad-size-option:hover {
    background-color: var(--primary-dark);
    color: white;
}

.ad-size-option.selected {
    background-color: var(--primary);
    color: var(--dark);
    font-weight: bold;
    border-color: var(--primary);
}

.color-picker {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--primary);
    transform: scale(1.1);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: var(--secondary-light);
    margin: 5% auto;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 600px;
    position: relative;
    color: var(--light);
    border: 1px solid var(--primary);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--primary);
}

.close-btn:hover {
    color: var(--light);
}

.crop-container {
    margin-top: 20px;
}

.crop-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.crop-controls input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 8px;
    background: var(--secondary);
    border-radius: 4px;
    outline: none;
}

.crop-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.crop-controls button {
    padding: 8px 15px;
}

/* Cloudinary Video Ad Styles */
.cloudinary-video-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: auto;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 10px;
    background-color: #000;
}

.cloudinary-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cloudinary-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 5;
}

.cloudinary-sound-btn {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0,0,0,0.6);
    border: none;
    padding: 8px;
    border-radius: 50%;
    z-index: 10;
    cursor: pointer;
}

.cloudinary-sound-btn img {
    width: 20px;
    height: 20px;
}

/* Developer Popup Responsive */
@media (max-width: 768px) {
    #developer-popup {
        max-width: 250px;
        bottom: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    #developer-popup {
        max-width: 200px;
        padding: 10px;
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        border-radius: 0;
        margin-right: 0;
        margin-bottom: 2px;
    }
    
    .ad-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ad-item-actions {
        margin-top: 10px;
        align-self: flex-end;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    #header-ad {
        height: 60px;
    }
    
    #header-ad div {
        font-size: 10px;
        padding: 5px;
    }
}

@media (max-width: 480px) {
    .preview-actions {
        flex-direction: column;
    }
    
    .crop-btn, .clear-btn {
        width: 100%;
    }
    
    #header-ad {
        height: 50px;
    }
    
    #header-ad div {
        font-size: 8px;
        padding: 3px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
}
/* Link Exchanger Styles */
#openBtn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #FFD700;
  color: #000;
  border: none;
  border-radius: 30px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
  z-index: 1000;
}

.popup {
  position: fixed;
  bottom: 70px;
  right: 16px;
  background: #222;
  border: 1px solid #FFD700;
  border-radius: 10px;
  width: 260px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
  display: none;
  z-index: 999;
}

.popup input {
  width: 100%;
  padding: 6px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #333;
  color: #fff;
  font-size: 13px;
  margin-bottom: 8px;
}

.popup button {
  width: 100%;
  background: #FFD700;
  color: #000;
  border: none;
  padding: 7px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 4px;
  font-size: 13px;
}

.popup .result {
  margin-top: 8px;
  font-size: 12px;
  color: #FFD700;
  word-break: break-all;
}

.close {
  position: absolute;
  top: 6px;
  right: 10px;
  color: #FFD700;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
}

.copy-btn {
  background: transparent;
  border: none;
  color: #FFD700;
  font-size: 12px;
  cursor: pointer;
  float: right;
}
