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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

header {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.header-logo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.header-text {
    text-align: left;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

header p {
    margin: 0.25rem 0 0 0;
}

main {
    padding: 2rem;
}

.prd-container {
    display: block;
    max-width: none;
    margin: 0;
}

.intro-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.intro-section h2 {
    color: #333;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.intro-section p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.process-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.intro-closing {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: #00b4db;
}

.process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.process-icon {
    font-size: 2rem;
    background: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 180, 219, 0.15);
    border: 2px solid #e9ecef;
}

.process-label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
    text-align: center;
}

.process-arrow {
    font-size: 1.5rem;
    color: #00b4db;
    font-weight: bold;
}

@media (max-width: 768px) {
    .intro-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .intro-section h2 {
        font-size: 1.4rem;
    }
    
    .intro-section p {
        font-size: 1rem;
    }
    
    .process-flow {
        gap: 0.5rem;
        margin: 1.5rem 0;
    }
    
    .process-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .process-arrow {
        font-size: 1.25rem;
    }
}

.prd-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.form-title {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #00b4db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: #0083b0;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-btn.expanded .toggle-icon {
    transform: rotate(45deg);
}

.form-fields {
    transition: all 0.3s ease;
    overflow: hidden;
}

.prd-form.collapsed {
    padding: 1.5rem 2rem;
}

.prd-form.collapsed .form-fields {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.prd-form.collapsed .form-header {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.form-group label .label-help {
    font-weight: 400;
    color: #666;
    font-size: 0.875rem;
}

.form-group textarea,
.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: #00b4db;
}

.generate-btn {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 100%;
    margin-top: 1rem;
}

.generate-btn:hover {
    opacity: 0.9;
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prd-output {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.prd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.prd-output h2 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
}

.output-actions-bottom {
    margin-top: 1.5rem;
}

.prd-content {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #00b4db;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.prd-content h1 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #00b4db;
    padding-bottom: 0.5rem;
}

.prd-content h2 {
    color: #333;
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.25rem;
}

.prd-content h3 {
    color: #555;
    font-size: 1.2rem;
    margin: 1.25rem 0 0.5rem 0;
}

.prd-content h4 {
    color: #666;
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem 0;
}

.prd-content p {
    margin-bottom: 1rem;
    color: #333;
}

.prd-content ul, .prd-content ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

.prd-content li {
    margin-bottom: 0.5rem;
    color: #333;
}

.prd-content strong {
    color: #333;
    font-weight: 600;
}

.prd-content em {
    font-style: italic;
    color: #555;
}

.prd-content code {
    background: #e1e8f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.prd-content pre {
    background: #e1e8f0;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
}

.prd-content blockquote {
    border-left: 3px solid #00b4db;
    padding-left: 1rem;
    margin: 1rem 0;
    background: #ffffff;
    font-style: italic;
}

.prd-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.prd-content th, .prd-content td {
    border: 1px solid #e0e0e0;
    padding: 0.75rem;
    text-align: left;
}

.prd-content th {
    background: #00b4db;
    color: white;
    font-weight: 600;
}

.secondary-btn {
    background: transparent;
    color: #00b4db;
    border: 2px solid #00b4db;
    padding: 0.4rem 0.7rem;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    white-space: nowrap;
}

.secondary-btn:hover {
    background: #00b4db;
    color: white;
}

.output-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.copy-btn, .notion-btn, .confluence-btn, .markdown-btn, .pdf-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    padding: 0.4rem 0.7rem;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: white;
    white-space: nowrap;
}

.copy-btn, .notion-btn, .confluence-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.markdown-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #563d7c 100%);
}

.pdf-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.copy-btn:hover, .notion-btn:hover, .confluence-btn:hover, .markdown-btn:hover, .pdf-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.copy-btn svg, .markdown-btn svg, .pdf-btn svg {
    flex-shrink: 0;
}

.continue-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
    font-weight: 500;
}

.continue-btn:hover {
    opacity: 0.9;
}

.additional-instructions-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin: 1.5rem 0;
}

.field-help {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

.hidden {
    display: none !important;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 1.5rem 2rem;
}

.modal-description {
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid #e0e0e0;
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
}

.validation-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #c33;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease-out;
}

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

.loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-style: italic;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #00b4db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading Animation Styles */
.loading-container {
    background: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 2rem;
}

.loading-content {
    max-width: 500px;
    margin: 0 auto;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

.spinner-ring {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
    border-top-color: #00b4db;
}

.spinner-ring:nth-child(1) {
    width: 80px;
    height: 80px;
    animation: spin-smooth 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: #0083b0;
    opacity: 0.7;
    animation: spin-smooth 2s linear infinite reverse;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: #20c997;
    opacity: 0.5;
    animation: spin-smooth 1s linear infinite;
}

@keyframes spin-smooth {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

.loading-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.loading-message {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.progress-container {
    margin-top: 1rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 1px solid #d0d0d0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00b4db 0%, #0083b0 100%);
    width: 0%;
    transition: width 0.8s ease;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 180, 219, 0.3);
}

.progress-text {
    font-size: 0.9rem;
    color: #555;
    text-align: center;
    font-weight: 500;
}


.footer {
    text-align: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
}

.footer a {
    color: #666;
    text-decoration: none;
}

.footer a:hover {
    color: #00b4db;
    text-decoration: underline;
}

/* Large desktop screens */
@media (min-width: 1400px) {
    main {
        padding: 3rem 4rem;
    }
    
    .prd-form,
    .prd-output {
        padding: 2.5rem;
    }
    
    header {
        padding: 3rem;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    main {
        padding: 2.5rem 3rem;
    }
    
    .form-group {
        margin-bottom: 2rem;
    }
    
    .prd-content {
        padding: 2rem;
    }
}

/* Tablet and mobile */
@media (max-width: 768px) {
    .container {
        margin: 0;
        min-height: 100vh;
    }
    
    main {
        padding: 1rem;
    }
    
    .prd-form,
    .prd-output {
        padding: 1.5rem;
    }
    
    .form-group textarea,
    .form-group input {
        padding: 0.75rem;
    }
    
    .output-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .copy-btn, .notion-btn, .confluence-btn, .markdown-btn, .pdf-btn,
    .secondary-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    header {
        padding: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .header-logo {
        width: 60px;
        height: 60px;
    }
    
    .header-text {
        text-align: center;
    }
    
    header h1 {
        font-size: 1.35rem;
    }
}
