:root {
    --gitlab-orange: #FC6D26;
    --gitlab-purple: #6B4FBB;
    --gitlab-dark: #1F1E24;
    --gitlab-gray: #303030;
    --gitlab-light-gray: #F0F0F0;
    --success-green: #108548;
    --error-red: #DD2B0E;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--gitlab-dark);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, var(--gitlab-purple) 0%, var(--gitlab-orange) 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

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

.logo svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

h1 {
    font-size: 2rem;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-top: 10px;
}

.content {
    padding: 40px;
}

/* Steps */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 0.7;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gitlab-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--gitlab-orange);
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: var(--success-green);
    color: white;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gitlab-gray);
}

.step-connector {
    width: 80px;
    height: 2px;
    background: var(--gitlab-light-gray);
    margin: 0 10px;
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

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

h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--gitlab-dark);
}

.section-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gitlab-dark);
}

input[type="text"],
input[type="url"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--gitlab-orange);
    box-shadow: 0 0 0 3px rgba(252, 109, 38, 0.1);
}

textarea {
    resize: vertical;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.6;
}

small {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 0.9rem;
}

small a {
    color: var(--gitlab-orange);
    text-decoration: none;
}

small a:hover {
    text-decoration: underline;
}

code {
    background: var(--gitlab-light-gray);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: #e85c1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(252, 109, 38, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--gitlab-orange);
    border: 2px solid var(--gitlab-orange);
}

.btn-secondary:hover {
    background: var(--gitlab-orange);
    color: white;
}

.btn-text {
    background: transparent;
    color: var(--gitlab-orange);
    padding: 8px 16px;
}

.btn-text:hover {
    background: rgba(252, 109, 38, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Editor Toolbar */
.editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: var(--gitlab-light-gray);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border: 2px solid #e0e0e0;
    border-bottom: none;
}

.toolbar-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: var(--gitlab-orange);
    color: white;
    border-color: var(--gitlab-orange);
}

.editor-toolbar + textarea {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Preview */
.preview-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--gitlab-light-gray);
    border-radius: var(--border-radius);
}

.preview-section h3 {
    margin-bottom: 15px;
    color: var(--gitlab-dark);
}

.markdown-preview {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    min-height: 200px;
    line-height: 1.6;
}

.markdown-preview h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.markdown-preview h2 {
    font-size: 1.5rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

.markdown-preview p {
    margin-bottom: 15px;
}

.markdown-preview ul,
.markdown-preview ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

.markdown-preview code {
    background: var(--gitlab-light-gray);
    padding: 2px 6px;
    border-radius: 4px;
}

.markdown-preview pre {
    background: var(--gitlab-dark);
    color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin-bottom: 15px;
}

.markdown-preview img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--gitlab-light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.user-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--gitlab-dark);
}

.user-username {
    color: #666;
    font-size: 0.95rem;
}

/* Status Messages */
.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--border-radius);
    display: none;
    animation: slideIn 0.3s ease;
}

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

.status-message.show {
    display: block;
}

.status-message.success {
    background: #e6f4ea;
    color: var(--success-green);
    border: 1px solid var(--success-green);
}

.status-message.error {
    background: #fce8e6;
    color: var(--error-red);
    border: 1px solid var(--error-red);
}

.status-message.info {
    background: #e8f0fe;
    color: #1967d2;
    border: 1px solid #1967d2;
}

/* Success Section */
.success-content {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 30px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-details {
    background: var(--gitlab-light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    text-align: left;
}

.success-details p {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.success-details strong {
    color: var(--gitlab-dark);
}

.success-details a {
    color: var(--gitlab-orange);
    text-decoration: none;
    word-break: break-all;
}

.success-details a:hover {
    text-decoration: underline;
}

.success-content .button-group {
    justify-content: center;
}

/* Footer */
footer {
    background: var(--gitlab-light-gray);
    padding: 30px;
    text-align: center;
    color: #666;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--gitlab-orange);
    text-decoration: none;
    margin: 0 5px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links span {
    margin: 0 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .content {
        padding: 20px;
    }

    header {
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .steps {
        flex-wrap: wrap;
    }

    .step-connector {
        width: 40px;
    }

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

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .editor-toolbar {
        flex-wrap: wrap;
    }
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
