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

body {
    font-family: 'Courier New', monospace;
    background-color: #f0f0f0;
    color: #0d0d0d;
    font-weight: bold;
    line-height: 1.6;
    min-height: 100vh;
}

/* Add 3D text effects like the presentation */
.text-3d {
    color: #0d0d0d;
    font-weight: bold;
    text-shadow: 2px 2px 0px #ffffff, 4px 4px 0px #cccccc, 6px 6px 0px #999999;
}

.text-3d-large {
    color: #0d0d0d;
    font-weight: bold;
    text-shadow: 3px 3px 0px #ffffff, 6px 6px 0px #cccccc, 9px 9px 0px #999999;
}

.brand-color { 
    color: #0d0d0d; 
    font-weight: bold;
    text-shadow: 2px 2px 0px #ffffff, 4px 4px 0px #cccccc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    background: #ffffff;
    border: 2px solid #0d0d0d;
    box-shadow: 2px 2px 0px #0d0d0d;
    padding: 30px;
    font-family: 'Courier New', monospace;
}

header h1 {
    font-size: 2.5rem;
    color: #0d0d0d;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 2px 2px 0px #ffffff, 4px 4px 0px #cccccc;
}

.subtitle {
    font-size: 1.2rem;
    color: #0d0d0d;
    font-weight: bold;
}

/* Main content */
main {
    display: grid;
    gap: 30px;
}

section {
    background: #ffffff;
    border: 2px solid #0d0d0d;
    box-shadow: 2px 2px 0px #0d0d0d;
    padding: 30px;
    font-family: 'Courier New', monospace;
}

section h2 {
    color: #0d0d0d;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: bold;
    border-bottom: 3px solid #D97706;
    padding-bottom: 10px;
    text-shadow: 1px 1px 0px #ffffff;
}

/* Input section */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #0d0d0d;
    font-family: 'Courier New', monospace;
}

.input-group input[type="text"],
.input-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #0d0d0d;
    border-radius: 0px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: #ffffff;
    color: #0d0d0d;
    transition: all 0.3s ease;
}

.input-group input[type="text"]:focus,
.input-group input[type="number"]:focus {
    outline: none;
    border-color: #D97706;
    box-shadow: 2px 2px 0px #D97706;
}

.method-selection {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.method-selection label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #0d0d0d;
}

/* Buttons */
.btn {
    background-color: #0d0d0d;
    color: #ffffff;
    border: 2px solid #0d0d0d;
    padding: 12px 24px;
    border-radius: 0px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.btn:hover {
    background-color: #ffffff;
    color: #0d0d0d;
    transform: scale(1.05);
    box-shadow: 2px 2px 0px #0d0d0d;
}

.btn:active {
    transform: scale(0.95);
    box-shadow: 1px 1px 0px #0d0d0d;
}

.btn-secondary {
    background-color: #D97706;
    color: #ffffff;
    border: 2px solid #D97706;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #D97706;
    box-shadow: 2px 2px 0px #D97706;
}

/* Results section */
.sequence-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: #ffffff;
    border: 2px solid #0d0d0d;
    box-shadow: 2px 2px 0px #0d0d0d;
    padding: 20px;
    font-family: 'Courier New', monospace;
}

.info-card h3 {
    color: #0d0d0d;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 0px #ffffff;
}

.info-card p {
    margin-bottom: 8px;
    font-weight: bold;
    color: #0d0d0d;
}

.info-card strong {
    color: #D97706;
    font-weight: bold;
}

/* Chart container */
.chart-container {
    background: #ffffff;
    border: 2px solid #0d0d0d;
    box-shadow: 2px 2px 0px #0d0d0d;
    padding: 20px;
    margin: 20px 0;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
}

/* Sequence table */
.sequence-table {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 2px solid #0d0d0d;
    box-shadow: 2px 2px 0px #0d0d0d;
    font-family: 'Courier New', monospace;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #0d0d0d;
    font-weight: bold;
    color: #0d0d0d;
}

th {
    background: #0d0d0d;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Courier New', monospace;
}

tr:hover {
    background-color: #f0f0f0;
}

tr:last-child td {
    border-bottom: none;
}

/* Arbitrary Defc analysis */
.summary-card {
    background: #ffffff;
    border: 2px solid #0d0d0d;
    box-shadow: 2px 2px 0px #0d0d0d;
    padding: 20px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.available-defc-info {
    background: #ffffff;
    border: 2px solid #D97706;
    box-shadow: 2px 2px 0px #D97706;
    padding: 20px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.defc-values-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.defc-value-item {
    background: #ffffff;
    border: 2px solid #0d0d0d;
    box-shadow: 2px 2px 0px #0d0d0d;
    padding: 15px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #0d0d0d;
}

.defc-analysis-details {
    display: grid;
    gap: 15px;
}

.defc-analysis-item {
    background: white;
    border: 2px solid #0d0d0d;
    box-shadow: 2px 2px 0px #0d0d0d;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #0d0d0d;
}

.btn-outline {
    background-color: transparent;
    color: #0d0d0d;
    border: 2px solid #0d0d0d;
}

.btn-outline:hover {
    background-color: #0d0d0d;
    color: #ffffff;
    box-shadow: 2px 2px 0px #0d0d0d;
}

/* Mathematical background */
.math-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.math-card {
    background: #ffffff;
    border: 2px solid #0d0d0d;
    box-shadow: 2px 2px 0px #0d0d0d;
    padding: 25px;
    font-family: 'Courier New', monospace;
}

.math-card h3 {
    color: #0d0d0d;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 1px 1px 0px #ffffff;
}

.math-card ul {
    list-style: none;
    padding-left: 0;
}

.math-card li {
    padding: 8px 0;
    border-bottom: 1px solid #0d0d0d;
    position: relative;
    padding-left: 20px;
    font-weight: bold;
    color: #0d0d0d;
}

.math-card li:before {
    content: "▶";
    color: #D97706;
    position: absolute;
    left: 0;
}

.math-card li:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #0d0d0d;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .sequence-info {
        grid-template-columns: 1fr;
    }
    
    .method-selection {
        flex-direction: column;
        gap: 10px;
    }
    
    .math-content {
        grid-template-columns: 1fr;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes slideIn {
    0% { 
        opacity: 0;
        transform: translateY(-20px);
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error messages */
.error {
    background: #ffffff;
    color: #0d0d0d;
    padding: 10px;
    border: 2px solid #0d0d0d;
    box-shadow: 2px 2px 0px #0d0d0d;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* Success messages */
.success {
    background: #ffffff;
    color: #0d0d0d;
    padding: 10px;
    border: 2px solid #D97706;
    box-shadow: 2px 2px 0px #D97706;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}