/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary-color: #6366f1;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

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

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Step Navigation */
.step-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.step-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.step-btn:hover {
    border-color: var(--primary-color);
}

.step-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.step-btn.completed {
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.1);
}

.step-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
}

.step-btn.active .step-number {
    background: white;
    color: var(--primary-color);
}

.step-label {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Main Content */
main {
    flex: 1;
}

.step-content {
    display: none;
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-content h2 {
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.step-content .intro {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1rem;
}

/* Guidelines Grid */
.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.guideline-card {
    padding: 24px;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.guideline-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.guideline-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.guideline-icon svg {
    color: var(--primary-color);
}

.guideline-card h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.guideline-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Assessment Form */
#assessment-form {
    margin-bottom: 32px;
}

.question-group {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--background-color);
    border-radius: var(--radius-lg);
}

.question-group h3 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.question {
    margin-bottom: 12px;
}

.question label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.question label:hover {
    background: var(--surface-color);
}

.question input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Score Display */
.score-display {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.1));
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--surface-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.score-max {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.score-label {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Badge Customization */
.badge-customization {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.customization-options h3,
.badge-preview-container h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.option-group {
    margin-bottom: 20px;
}

.option-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.option-group input,
.option-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--surface-color);
}

.option-group input:focus,
.option-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.option-group input[type="color"] {
    padding: 4px;
    height: 48px;
    cursor: pointer;
}

.badge-preview-container {
    display: flex;
    flex-direction: column;
}

.badge-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 16px;
    min-height: 200px;
    border: 2px dashed var(--border-color);
}

/* Embed Options */
.embed-options {
    margin-bottom: 32px;
}

.embed-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.embed-tab {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
}

.embed-tab:hover {
    border-color: var(--primary-color);
}

.embed-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.code-container {
    position: relative;
    background: #1e293b;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.code-container pre {
    padding: 24px;
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.badge-final-preview {
    text-align: center;
    padding: 32px;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.badge-final-preview h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Verification */
.verification-container {
    margin-bottom: 32px;
}

.verify-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 500px;
    margin-bottom: 24px;
}

.verify-input-group label {
    font-weight: 500;
    color: var(--text-secondary);
}

.verify-input-group input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
}

.verify-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.verification-result {
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    display: none;
}

.verification-result.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
}

.verification-result.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
}

.verification-result h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.verification-result.success h4 {
    color: var(--success-color);
}

.verification-result.error h4 {
    color: var(--error-color);
}

.your-badge-info {
    padding: 24px;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.your-badge-info h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.badge-details {
    display: grid;
    gap: 12px;
}

.badge-detail {
    display: flex;
    gap: 12px;
}

.badge-detail-label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 140px;
}

.badge-detail-value {
    color: var(--text-primary);
}

.verification-info {
    padding: 24px;
    background: var(--background-color);
    border-radius: var(--radius-lg);
}

.verification-info h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.verification-info p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.verification-info ul {
    margin-left: 24px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.verification-info li {
    margin-bottom: 4px;
}

.verification-info .note {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.btn-secondary {
    background: var(--background-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Footer */
footer {
    margin-top: auto;
    padding: 32px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.footer-content .powered-by a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.footer-content .powered-by a:hover {
    text-decoration: underline;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Badge Styles */
.ethical-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--primary-color);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ethical-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.15);
}

.badge-icon {
    margin-bottom: 8px;
}

.badge-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.badge-score {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.badge-verified {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.625rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Badge Sizes */
.ethical-badge.small {
    padding: 10px 16px;
}

.ethical-badge.small .badge-icon svg {
    width: 24px;
    height: 24px;
}

.ethical-badge.small .badge-title {
    font-size: 0.75rem;
}

.ethical-badge.small .badge-score {
    font-size: 0.625rem;
}

.ethical-badge.large {
    padding: 24px 36px;
}

.ethical-badge.large .badge-icon svg {
    width: 48px;
    height: 48px;
}

.ethical-badge.large .badge-title {
    font-size: 1.125rem;
}

.ethical-badge.large .badge-score {
    font-size: 0.875rem;
}

/* Badge Styles Variants */
.ethical-badge.classic {
    background: #fff;
    border: 3px solid;
    border-radius: 8px;
}

.ethical-badge.minimal {
    background: transparent;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.ethical-badge.minimal:hover {
    border-color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    header {
        padding: 24px 12px;
    }

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

    .logo h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    .tagline {
        font-size: 1rem;
    }

    .step-nav {
        gap: 4px;
    }

    .step-btn {
        padding: 8px 12px;
        flex-direction: column;
        gap: 4px;
    }

    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-content {
        padding: 20px;
    }

    .step-content h2 {
        font-size: 1.375rem;
    }

    .guidelines-grid {
        grid-template-columns: 1fr;
    }

    .badge-customization {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .score-display {
        flex-direction: column;
        text-align: center;
    }

    .step-actions {
        flex-direction: column;
    }

    .step-actions .btn {
        width: 100%;
    }

    .embed-tabs {
        flex-wrap: wrap;
    }

    .verify-input-group {
        max-width: 100%;
    }

    .badge-detail {
        flex-direction: column;
        gap: 4px;
    }

    .badge-detail-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .logo svg {
        width: 36px;
        height: 36px;
    }

    .step-btn {
        padding: 6px 8px;
    }

    .step-label {
        display: none;
    }

    .guideline-card {
        padding: 16px;
    }

    .question-group {
        padding: 16px;
    }

    .question label {
        padding: 8px;
        font-size: 0.9375rem;
    }
}
