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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.input-section {
    margin-bottom: 30px;
}

.input-section h2 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

#cssInput {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#cssInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

#analyzeBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#clearBtn {
    background: #e53e3e;
    color: white;
}

#clearBtn:hover {
    background: #c53030;
    transform: translateY(-2px);
}

#uploadBtn {
    background: #38a169;
    color: white;
}

#uploadBtn:hover {
    background: #2f855a;
    transform: translateY(-2px);
}

.results-section {
    margin-bottom: 30px;
}

.stats-section {
    margin-bottom: 30px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    align-items: start;
    width: 100%;
}

.analysis-results {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    margin-bottom: 20px;
}

.framework-info {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #4299e1;
}

.framework-info h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.framework-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.framework-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.framework-label {
    font-weight: 600;
    color: #4a5568;
}

.framework-value {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 13px;
    color: #4299e1;
    font-weight: 500;
}

.framework-value a {
    color: #4299e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.framework-value a:hover {
    color: #667eea;
    text-decoration: underline;
}

.analysis-results h2 {
    color: #4a5568;
    margin-bottom: 15px;
}

#results {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    min-height: 100px;
}

.statistics {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #38a169;
}

.classless-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #9f7aea;
}

.stats-container .complexity-analysis {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #e53e3e;
    min-height: 200px;
}

.stats-container .classless-features {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #38a169;
    min-height: 200px;
}

.statistics h3,
.classless-stats h3,
.stats-container .complexity-analysis h3,
.stats-container .classless-features h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 600;
    color: #4a5568;
}

.stat-value {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.details-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.selectors-list,
.colors-list,
.properties-list,
.html5-landmarks,
.document-structure,
.headings-elements,
.text-content-elements,
.list-elements,
.table-elements,
.form-elements,
.media-elements,
.layout-analysis,
.complexity-analysis,
.classless-features {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ed8936;
}

.selectors-list h3,
.colors-list h3,
.properties-list h3,
.html5-landmarks h3,
.document-structure h3,
.headings-elements h3,
.text-content-elements h3,
.list-elements h3,
.table-elements h3,
.form-elements h3,
.media-elements h3,
.layout-analysis h3,
.complexity-analysis h3,
.classless-features h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.selector-item,
.color-item,
.property-item {
    background: white;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 13px;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.classless-type {
    font-size: 12px !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    font-weight: bold !important;
}

.classless-type.classless {
    background: #48bb78 !important;
    color: white !important;
}

.classless-type.class-light {
    background: #ed8936 !important;
    color: white !important;
}

.classless-type.traditional {
    background: #e53e3e !important;
    color: white !important;
}

.simplicity-score {
    font-weight: bold !important;
}

.feature-item {
    background: white;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feature-badge {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.complexity-item {
    background: white;
    padding: 10px 12px;
    margin: 5px 0;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.complexity-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
}

.complexity-value {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 13px;
    color: #667eea;
}

.layout-item {
    background: white;
    padding: 10px 12px;
    margin: 5px 0;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.layout-element {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
}

.layout-properties {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 12px;
    color: #667eea;
    line-height: 1.4;
}

.layout-type {
    display: inline-block;
    background: #4299e1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    margin-right: 8px;
    margin-bottom: 4px;
}

.error {
    color: #e53e3e;
    background: #fed7d7;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #e53e3e;
}

.success {
    color: #38a169;
    background: #c6f6d5;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #38a169;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 20px;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .details-section {
        grid-template-columns: 1fr;
    }

    .buttons {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}
