@font-face {
    font-family: 'SpaceMono';
    src: url('assets/SpaceMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SpaceMono';
    src: url('assets/SpaceMono-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'SpaceMono';
    src: url('assets/SpaceMono-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'SpaceMono';
    src: url('assets/SpaceMono-BoldItalic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}

:root {
    --tint: rgb(70, 131, 255);

    --primary: white;
    --primary-transparent-1: rgba(255, 255, 255, 0.1);
    --primary-transparent-2: rgba(255, 255, 255, 0.05);
    --primary-invert: rgb(20, 20, 20);
    --primary-invert-transparent: rgba(20, 20, 20, 0.8);
    --secondary-gray: rgb(115, 115, 115);
    --tertiary-gray: rgb(85, 85, 85);
    --quaternary-gray: rgb(55, 55, 55);
    --quinary-gray: rgb(45, 45, 45);

    --light-background-1: rgb(33, 33, 33);
    --light-background-2: rgb(25, 25, 25);

    --active-color: rgb(27, 27, 27);
}

body {
    background-color: black;
    margin: 0;

    font-family: 'SpaceMono', monospace;
}

.main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: calc(100% - 40px);
    padding: 20px;
    padding-top: 0px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.title-pre {
    font-size: 24px;
    color: var(--secondary-gray);
    text-align: center;
    padding: 40px;
    padding-bottom: 0%;
    padding-top: 60px;
}

.title {
    font-size: 56px;
    font-weight: bold;
    color: var(--primary);
    text-align: center;
    padding: 40px;
    padding-top: 0%;
    padding-bottom: 10px;
}

.description {
    font-size: 16px;
    font-style: italic;
    color: var(--primary);
    text-align: center;
    padding: 40px;
    padding-top: 0%;
    padding-bottom: 60px;
}

.list-section {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.list-item {
    position: relative;
    width: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary-invert);
    padding: 20px;
    border-radius: 16px;
}

.list-item-title, .list-item-icon {
    font-size: 18px;
    color: var(--primary);
    font-weight: bold;
}

.list-item-icon {
    font-size: 24px;
}

.list-item-button {
    position: absolute;
    right: 14px;
    top: 10px;
    font-size: 14px;
    color: var(--secondary-gray);
    cursor: pointer;
    transition: opacity 0.25s ease-in-out;
}

.list-item-button:hover {
    opacity: 0.5;
}

.list-item-description {
    font-size: 14px;
    color: var(--primary);
    font-style: italic;
}

.add-section {
    width: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    background-color: var(--primary-invert);
    padding: 20px;
    border-radius: 16px;
}

.subtitle {
    font-size: 30px;
    color: var(--primary);
    font-weight: bold;
    text-align: center;
}

.heading {
    font-size: 18px;
    color: var(--primary);
    font-weight: normal;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 5px;
}

.type, .usage {
    overflow: scroll;
    scrollbar-width: none;
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.type-item, .usage-item {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;

    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: calc(100% - 40px);
    padding: 20px;
    border-radius: 10px;
    border: 3px solid transparent;
    background-color: var(--primary-transparent-2);
    transition: 0.25s ease-in-out;
}

.type-item:hover, .usage-item:hover {
    opacity: 0.8;
}

.type-item-selected, .usage-item-selected {
    border: 3px solid var(--primary);
}

.type-item-icon, .type-item-text {
    font-size: 18px;
    color: var(--primary);
    font-weight: bold;
}

.type-item-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.usage-item-title {
    font-size: 18px;
    color: var(--primary);
    font-weight: bold;
    text-align: center;
}

.usage-item-description {
    font-size: 14px;
    color: var(--secondary-gray);
    font-style: italic;
    text-align: center;
}

.model {
    width: calc(100% - 20px);
    padding: 10px;
    border-radius: 10px;
    background-color: var(--primary-transparent-2);
}

.model-input, .year-input {
    width: 100%;
    border: none;
    background-color: transparent;
    font-family: 'SpaceMono', monospace;
    font-size: 18px;
    color: var(--primary);
    text-align: center;
}

.model-input:focus, .year-input:focus {
    outline: none;
}

.year {
    width: calc(100% - 20px);
    padding: 10px;
    border-radius: 10px;
    background-color: var(--primary-transparent-2);
}

.add-button {
    width: fit-content;
    cursor: pointer;
    padding: 20px;
    padding-top: 16px;
    padding-bottom: 16px;
    margin-top: 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    background-color: var(--tint);
    color: white;
    transition: opacity 0.25s ease-in-out;
}

.add-button:hover {
    opacity: 0.8;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Archive Section Styles */
.archive {
    display: none;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.archive-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.archive-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.archive-description {
    font-size: 18px;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.5;
}

.highlight {
    color: #2ecc71;
    font-weight: 700;
}

.archive-subtitle {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 30px 0 20px;
}

.device-breakdown {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.breakdown-item {
    display: flex;
    align-items: center;
    padding: 15px;
    padding-left: 20px;
    border-radius: 2px 10px 10px 2px;
    transition: all 0.3s ease;
    position: relative;
    background: #f5f5f5;
}

.breakdown-item:after {
    content: "";
    width: 4px;
    height: 100%;
    border-radius: 4px;
    background-color: #6b6b6b;
    position: absolute;
    left: 0;
}

.breakdown-icon {
    font-size: 24px;
    margin-right: 20px;
}

.breakdown-info {
    flex: 1;
}

.breakdown-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.breakdown-details {
    font-size: 14px;
    color: #666;
}

.archive-tips {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
}

.tips-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.tips-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    padding: 10px 0;
    color: #666;
    position: relative;
    padding-left: 25px;
}

.tips-list li:before {
    content: "•";
    color: #2ecc71;
    position: absolute;
    left: 0;
}

.back-button {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    padding: 12px 24px;
    padding: 20px;
    padding-top: 16px;
    padding-bottom: 16px;
    border-radius: 10px;
    background: #2ecc71;
    color: white;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
}

.back-button:hover {
    opacity: 0.8;
}

/* Materials Breakdown Styles */
.materials-breakdown {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.materials-item {
    position: relative;
    width: calc(100% - 35px);
    display: flex;
    flex-direction: column;
    padding: 15px;
    padding-left: 20px;
    border-radius: 2px 10px 10px 2px;
}

.materials-item.hazardous {
    background-color: rgba(255, 107, 107, 0.1);
}

.materials-item.precious {
    background-color: rgba(241, 196, 15, 0.1);
}

.materials-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    border-radius: 2px;
}

.materials-item.hazardous::after {
    background-color: #ff6b6b;
}

.materials-item.precious::after {
    background-color: #f1c40f;
}

.materials-title {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin-bottom: 8px;
}

.materials-description {
    font-size: 14px;
    color: var(--secondary-gray);
    font-style: italic;
    margin-bottom: 12px;
    line-height: 1.4;
}

.materials-amount {
    font-size: 16px;
    color: var(--primary);
    font-weight: bold;
    border-radius: 6px;
    width: fit-content;
}

.materials-item.hazardous .materials-amount {
    color: #ff6b6b;
}

.materials-item.precious .materials-amount {
    color: #f1c40f;
}

.archive-subtitle {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-invert);
    margin: 30px 0 20px;
    text-align: center;
}

@media (max-width: 800px) {
    .title-pre {
        font-size: 20px;
    }

    .title {
        font-size: 40px;
    }

    .subtitle {
        font-size: 24px;
    }

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

    .list-item {
        width: calc(100% - 40px);
    }

    .archive {
        padding: 20px;
    }

    .archive-content {
        padding: 20px;
    }
    
}