body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-image: url('../photo/LMC.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    margin: 0;
    padding: 0;
    font-weight: 300;
    min-height: 100vh;
}

.section-description {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.input-section,
.results-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-section h3,
.results-section h3 {
    color: #C5A059;
    font-size: 1.2em;
    font-weight: 400;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.3), transparent);
    margin: 1.5rem 0;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.tool-button.primary {
    background: linear-gradient(45deg, #C5A059, #8e7340);
}

.tool-button.secondary {
    background: linear-gradient(45deg, #667eea, #4c63d2);
}

.tool-button.tertiary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
}

.tool-button.primary:hover {
    background: linear-gradient(45deg, #d4b06a, #9f814f);
}

.tool-button.secondary:hover {
    background: linear-gradient(45deg, #7389ff, #5b72e8);
}

.tool-button.tertiary:hover {
    background: linear-gradient(45deg, #ff7979, #fd6c6c);
}

.result-display {
    min-height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.placeholder-text {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-style: italic;
    margin-top: 2rem;
}

.coordinate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.coordinate-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.coordinate-section h3 {
    color: #C5A059;
    font-size: 1.2em;
    font-weight: 400;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.date-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.date-input-section,
.date-result-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.date-result-section .result-section {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 0;
}

.required {
    color: #ff6b6b;
    font-weight: bold;
}

.result-category {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    border-left: 4px solid #C5A059;
}

.result-category h4 {
    color: #C5A059;
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.result-item-compact {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.result-item-compact:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.result-label-compact {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.result-value-compact {
    font-size: 0.85rem;
    color: #C5A059;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

@media (max-width: 1024px) {
    .calculator-grid,
    .coordinate-grid,
    .date-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .button-group {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .tool-button {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .tool-button {
        width: 100%;
        margin: 0.3rem 0;
    }
    
    .input-section,
    .results-section,
    .coordinate-section,
    .date-input-section,
    .date-result-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .section-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .result-item-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .result-value-compact {
        align-self: flex-end;
        font-size: 0.9rem;
    }
}

.tool-section {
    transition: all 0.3s ease;
}

.tool-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.form-group {
    position: relative;
}

.form-group input:focus + .floating-label,
.form-group input:not(:placeholder-shown) + .floating-label {
    transform: translateY(-1.5rem) scale(0.8);
    color: #C5A059;
}

.floating-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 0 0.5rem;
    border-radius: 4px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(197, 160, 89, 0.3);
    border-top: 3px solid #C5A059;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

::selection,
::-moz-selection {
    background: rgba(197, 160, 89, 0.3);
}

.container.main-content {
    max-width: 1200px;
    margin: 120px auto 40px;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #ffffff;
    font-size: 2.5em;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 2px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.tool-section {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    color: #ffffff;
}

.tool-section h2 {
    font-size: 1.8em;
    color: #C5A059;
    margin-bottom: 25px;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.tool-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #C5A059, #8e7340);
    border-radius: 2px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #C5A059;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-size: 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus {
    outline: none;
    border-color: #C5A059;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.tool-button {
    background: linear-gradient(45deg, #C5A059, #8e7340);
    color: #ffffff;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    margin: 25px auto 0;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.25);
    width: fit-content;
    text-align: center;
}

.tool-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.3);
    background: linear-gradient(45deg, #d4b06a, #9f814f);
}

.tool-button:active {
    transform: translateY(0);
}

.result-section,
#redshift-result,
#magnitude-result,
#date-result,
#ra-result,
#dec-result {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
}

.result-section.show,
#redshift-result.show,
#magnitude-result.show,
#date-result.show,
#ra-result.show,
#dec-result.show {
    display: block;
    animation: fadeInUp 0.4s ease;
}

.result-section h4 {
    color: #C5A059;
    font-size: 1.2em;
    font-weight: 400;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 0.5px;
}

.result-item {
    margin: 12px 0;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid #C5A059;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.result-label {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    letter-spacing: 0.3px;
}

.result-value {
    color: #C5A059;
    font-weight: 600;
    font-size: 15px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.error-message {
    background: linear-gradient(45deg, #ff4757, #ff3742);
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 15px;
    margin-top: 15px;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.25);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.success-message {
    background: linear-gradient(45deg, #C5A059, #8e7340);
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 15px;
    margin-top: 15px;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.25);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.tool-section ul {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    list-style: none;
    padding: 0;
    margin: 25px 0 0 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-section ul li {
    margin: 10px 0;
    position: relative;
    padding-left: 25px;
    font-size: 14px;
}

.tool-section ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
}

.tool-section h3 {
    color: #C5A059;
    font-size: 1.3em;
    font-weight: 400;
    margin: 30px 0 15px 0;
    letter-spacing: 0.5px;
    text-align: center;
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-size: 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-group select:focus {
    outline: none;
    border-color: #C5A059;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.form-group select option {
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 10px;
    border: none;
}

.form-group select option:checked {
    background: #C5A059;
    color: #000000;
}

.form-group select option:hover {
    background: rgba(197, 160, 89, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(197, 160, 89, 0.6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(197, 160, 89, 0.8);
}

@media (max-width: 768px) {
    .container.main-content {
        margin-top: 100px;
        padding: 15px;
    }

    h1 {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .tool-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .tool-section h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

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

    .form-group input {
        padding: 10px 14px;
        font-size: 16px;
    }

    .tool-button {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        margin: 20px 0 0 0;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 15px;
    }

    .result-value {
        align-self: flex-end;
        font-size: 14px;
    }

    .result-label {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container.main-content {
        margin-top: 90px;
        padding: 10px;
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    .tool-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .tool-section h2 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }

    .tool-section h3 {
        font-size: 1.1em;
        margin: 25px 0 10px 0;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input {
        padding: 12px;
    }

    .tool-button {
        padding: 12px;
        font-size: 14px;
    }

    .result-item {
        padding: 12px;
    }

    .tool-section ul {
        padding: 15px;
        font-size: 13px;
    }

    .tool-section ul li {
        margin: 8px 0;
        padding-left: 20px;
    }
}

input[type="datetime-local"] {
    color-scheme: dark;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.8;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-group input:focus-visible {
    outline: 2px solid rgba(197, 160, 89, 0.5);
    outline-offset: 2px;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .tool-button {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}