/* Font is now rendered server-side with Jimp - no need for client-side @font-face */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Impact', 'Arial Black', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #ffffff;
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.main-header-image {
    display: block;
    margin: 0 auto 15px auto;
    max-width: 400px;
    width: 90%;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

header p {
    color: #cccccc;
    font-size: 1.1rem;
}

.creator-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.form-container,
.preview-container {
    background: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-container h2,
.preview-container h3 {
    color: #ffd700;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.section-title {
    display: block;
    margin: 0 auto 25px auto;
    max-width: 300px;
    height: auto;
}

.form-label {
    display: block;
    margin-bottom: 15px;
    height: 45px !important;
    width: auto;
    max-width: none;
    object-fit: contain;
    object-position: left center;
    vertical-align: top;
}

/* Specific adjustments for smaller labels */
.form-label[src*="badge-text"],
.form-label[src*="progress-bar"] {
    height: 50px !important;
}

.checkbox-label {
    margin-left: 10px;
    height: 50px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    object-position: left center;
    vertical-align: middle;
}

.badge-option-img {
    width: 80px;
    margin-right: 15px;
    margin-left: 20px;
}

.preview-title {
    color: #ffd700;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #ffffff;
}

.selection-grid {
    display: grid;
    gap: 15px;
}

.badge-designs {
    grid-template-columns: 1fr 1fr;
}

.marine-colors {
    grid-template-columns: repeat(2, 1fr);
}

.option {
    position: relative;
}

.option input[type="radio"] {
    display: none;
}

.option label {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 300px;
    height: 100px;
}

.option label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 215, 0, 0.5);
}

.option input[type="radio"]:checked+label {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
}

/* Special styling for badge-1 - just show the image */
.option[data-badge="badge-1"] label {
    background: none;
    border: none;
    padding: 0;
}

.option[data-badge="badge-1"] label:hover {
    background: none;
    border: none;
}

.option[data-badge="badge-1"] input[type="radio"]:checked+label {
    background: none;
    border: none;
}

.option[data-badge="badge-1"] img {
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Coming Soon Badge Styling - Maximum Override */
.coming-soon-option {
    opacity: 0.6 !important;
}

.coming-soon-option input[type="radio"]:disabled+label,
.coming-soon-option input[type="radio"]:disabled+label.coming-soon-label,
.coming-soon-option .coming-soon-label {
    cursor: not-allowed !important;
    background: #2a2a2a !important;
    border: 2px solid #444444 !important;
    border-style: solid !important;
    outline: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
    animation: none !important;
    transition: none !important;
}

.coming-soon-option label:hover,
.coming-soon-option .coming-soon-label:hover {
    background: #2a2a2a !important;
    border-color: #444444 !important;
    border-style: solid !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

.coming-soon-option:hover {
    transform: none !important;
    animation: none !important;
}

.coming-soon-placeholder,
div.coming-soon-placeholder {
    display: block !important;
    height: 100px !important;
    width: 300px !important;
    background: #555555 !important;
    background-color: #555555 !important;
    background-image: none !important;
    border: none !important;
    outline: none !important;
    border-radius: 8px !important;
    font-family: 'Impact', 'Arial Black', sans-serif !important;
    font-weight: bold !important;
    color: #999999 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 14px !important;
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-align: center !important;
    line-height: 100px !important;
    vertical-align: middle !important;
}

.coming-soon-placeholder span {
    display: inline-block !important;
    line-height: normal !important;
    vertical-align: middle !important;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Space Marine Color Options - No Outline, Opacity Based */
.marine-colors .option label {
    background: none !important;
    border: none !important;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.marine-colors .option label:hover {
    background: none !important;
    border: none !important;
    opacity: 0.8;
}

.marine-colors .option input[type="radio"]:checked+label {
    background: none !important;
    border: none !important;
    opacity: 1.0;
}

.marine-colors .color-swatch {
    border: none !important;
}

.option span {
    font-weight: 500;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.char-counter {
    display: block;
    margin-top: 5px;
    color: #cccccc;
    font-size: 0.9rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ffd700;
}

.progress-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

input[type="range"] {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
    accent-color: #ffd700;
}

input[type="number"] {
    width: 80px;
}

.progress-unit {
    color: #cccccc;
    font-weight: bold;
}

.generate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    color: #1a1a2e;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.badge-preview {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.badge-preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.badge-preview-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    image-rendering: crisp-edges;
}

.preview-placeholder {
    text-align: center;
    color: #888888;
}

.output-section {
    background: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.output-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
}

.code-container {
    position: relative;
    margin: 20px 0;
}

#generatedCode,
#generatedBBCode {
    width: 100%;
    height: 120px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
}

.embed-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.embed-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #cccccc;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
}

.embed-tab:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.embed-tab.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

.embed-panel {
    display: none;
}

.embed-panel.active {
    display: block;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 15px;
    background: #ffd700;
    color: #1a1a2e;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
}

.copy-btn:hover {
    background: #ffed4a;
}

.usage-info {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.usage-info h4 {
    color: #ffd700;
    margin-bottom: 10px;
}

.usage-info ul {
    list-style: none;
    padding-left: 0;
}

.usage-info li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.usage-info li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: #ffd700;
    font-weight: bold;
}

@media (max-width: 768px) {
    .creator-section {
        grid-template-columns: 1fr;
    }

    .marine-colors {
        grid-template-columns: 1fr;
    }

    .main-header-image {
        max-width: 300px;
    }

    .container {
        padding: 15px;
    }
}
