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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

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

header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Messages */
.messages {
    margin-bottom: 20px;
}

.message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.message.error {
    background-color: #ffe6e6;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

.message.success {
    background-color: #e6f7ed;
    border-left: 4px solid #27ae60;
    color: #1e8449;
}

.message.warning {
    background-color: #fff3cd;
    border-left: 4px solid #f39c12;
    color: #856404;
}

/* Form Styles */
.upload-form {
    margin-bottom: 30px;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required {
    color: #e74c3c;
}

.optional {
    color: #95a5a6;
    font-weight: normal;
    font-size: 0.9em;
}

input[type="text"],
input[type="url"],
input[type="file"],
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="url"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    resize: vertical;
}

.help-text {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Deck Input Options */
.deck-input-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.input-option {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    background-color: white;
    transition: border-color 0.3s;
}

.input-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background-color: #f0f4ff;
}

.input-option input[type="radio"] {
    width: auto;
    margin-right: 8px;
}

.input-option > label[for*="option"] {
    display: inline;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
}

.input-option input[type="file"],
.input-option input[type="url"] {
    margin-top: 5px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-download {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background-color: #d5dbdb;
}

.btn-download {
    background-color: #3498db;
    color: white;
    margin: 5px;
}

.btn-download:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

/* Results Page */
.metadata {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.metadata h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.metadata p {
    margin-bottom: 8px;
}

.metadata a {
    color: #3498db;
    text-decoration: none;
}

.metadata a:hover {
    text-decoration: underline;
}

.download-buttons {
    text-align: center;
    margin: 30px 0;
}

.analysis-content {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 6px;
    line-height: 1.8;
    margin-bottom: 30px;
    white-space: pre-wrap;
}

.analysis-content h1 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.analysis-content h2 {
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 8px;
}

.analysis-content h3 {
    color: #7f8c8d;
    margin-top: 20px;
    margin-bottom: 10px;
}

.analysis-content ul,
.analysis-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.analysis-content li {
    margin-bottom: 8px;
}

.analysis-content p {
    margin-bottom: 15px;
}

.actions {
    text-align: center;
    margin-top: 30px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
    color: #95a5a6;
}

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

    header h1 {
        font-size: 2em;
    }

    .btn-download {
        display: block;
        margin: 10px 0;
    }
}
