/* Reset and base styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #ffffff;
}

/* Container and layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 80px 0 0;
    background-color: #0073b7;
    color: white;
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    letter-spacing: -1px;
}

.hero .tagline {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 300;
    opacity: 0.7;
}

.hero-description {
    font-size: 1.125rem;
    margin: 20px auto 0;
    max-width: 600px;
    opacity: 0.85;
}

.hero-examples {
    margin: 40px 0 0;
    display: flex;
    padding: 10px;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background-color: #ececec;
    border-bottom: 1px solid #d3d3d3;
    border-top: 1px solid #d3d3d3;
}

.hero-examples img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* Content sections */
.content {
    padding: 0 0 80px;
}

.content a {
    color: #667eea;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.content a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

section {
    margin-bottom: 80px;
}

h2 {
    font-size: 2.5rem;
    font-weight: 300;
    text-align: center;
    margin: 0 0 16px 0;
    color: #2c3e50;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 16px 0;
    color: #34495e;
}

.section-description {
    font-size: 1.125rem;
    color: #6c757d;
    margin: 0 auto 30px;
    max-width: 600px;
    text-align: center;
}

/* Generator section */
.generator-section {
    text-align: center;
    background: #f8f9fa;
    padding: 50px 40px;
    border-radius: 12px;
    scroll-margin-top: 20px;
}

.generator-form {
    max-width: 900px;
    margin: 0 auto;
}

.input-wrapper {
    margin-bottom: 25px;
}

.package-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.package-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.package-input::placeholder {
    color: #adb5bd;
}

/* Badge options */
.badge-options {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.option-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.options-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin: 0 0 10px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.style-options,
.data-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.option-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 20px;
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.option-label:hover {
    border-color: #667eea;
}

.option-label input {
    cursor: pointer;
}

.option-label input[type="radio"]:checked + span,
.option-label input[type="checkbox"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

/* Color swatches */
.color-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.color-swatch-label {
    position: relative;
    cursor: pointer;
}

.color-swatch-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-swatch {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.color-swatch-label input[type="radio"]:checked + .color-swatch {
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.2);
    transform: scale(1.05);
}

/* Status messages */
.status-messages {
    margin-top: 20px;
    min-height: 30px;
}

.package-not-found,
.package-not-valid {
    color: #e74c3c;
    font-weight: 500;
    padding: 12px;
    background: #fee;
    border-radius: 8px;
}

/* Generated badges */
.generated-badges {
    margin-top: 30px;
    padding: 0;
    background: transparent;
    border: none;
}

.badge-result {
    margin-top: 30px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.badge-result img {
    margin-bottom: 20px;
}

.embed-codes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.url-display-wrapper,
.code-display-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.url-display-wrapper label,
.code-display-wrapper label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
}

.copy-field-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.url-copy-field,
.code-copy-field {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-family: "Monaco", "Courier New", monospace;
    font-size: 0.9rem;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.url-copy-field:hover,
.code-copy-field:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.copy-btn {
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Styles section */
.styles-section {
    padding: 80px 0;
}

.style-category {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 60px 0 16px 0;
    text-align: center;
}

.style-category:first-of-type {
    margin-top: 0;
}

.category-description {
    font-size: 1rem;
    color: #6c757d;
    text-align: center;
    margin: 0 auto 40px;
    max-width: 800px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.option-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.option-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.option-card h3 {
    color: #667eea;
    margin-bottom: 12px;
}

.option-card p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.option-example {
    margin-bottom: 15px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Usage section */
.code-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.code-block {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e9ecef;
}

.code-block h3 {
    margin-top: 0;
    color: #667eea;
}

.code-block pre {
    margin: 0;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: "Monaco", "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
}

/* User packages page */
.user-packages {
    padding: 40px 0;
}

.user-packages h2 {
    text-align: center;
    margin-bottom: 40px;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.package-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.package-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.package-item h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
}

.package-item h3 a {
    color: #667eea;
    text-decoration: none;
}

.package-item h3 a:hover {
    text-decoration: underline;
}

.package-description {
    color: #6c757d;
    margin: 0 0 16px 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.package-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 16px;
}

.package-meta .version {
    font-weight: 600;
    color: #667eea;
    margin-right: 12px;
}

.badge-preview {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.9rem;
}

.footer p {
    margin: 8px 0;
}

.footer a {
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer a:hover {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 40px 0 30px;
        margin-bottom: 40px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero .tagline {
        font-size: 1.1rem;
    }

    .hero-examples {
        flex-direction: column;
        gap: 12px;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .generator-section {
        padding: 30px 20px;
    }

    .badge-options {
        flex-direction: column;
        gap: 20px;
    }

    .option-group {
        width: 100%;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .packages-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .code-examples {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .code-block {
        padding: 20px;
    }

    .code-block pre {
        padding: 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .tagline {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .package-input {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .option-label {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}
