* {
    box-sizing: border-box;
    border-color: hsl(217.2, 32.6%, 17.5%);
    margin: 0;
    padding: 0;
}

html {
    font-size: 1rem;
}

body {
    background-image: url('asset/wallpaper-pb-2.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: hsl(210, 40%, 98%);
    font-family: "Chakra Petch", sans-serif;
    line-height: 1.5;
    overflow-y: auto;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(3, 7, 18, 0.50);
    z-index: -5;
    pointer-events: none;
}

.app-container {
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    flex-grow: 1;
}

.main-grid {
    background-color: rgba(3, 7, 18, 0.85);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 1.5rem;
}

.header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.title {
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.7), 0 0 20px rgba(96, 165, 250, 0.5);
}

.description {
    color: #fff;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    line-height: 1.5;
}

.input-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    position: relative;
}

.input-group.disabled {
    opacity: 0.6;
}
.input-group.disabled label {
    opacity: 0.7;
}

.label {
    color: #93c5fd;
    margin-bottom: 0.25rem;
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
}

.input-container, .select-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input, .select {
    width: 100%;
    flex-grow: 1;
    background-color: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: hsl(210, 40%, 98%);
    padding: 0.5rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    min-height: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.input:focus, .select:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: hsl(224.3, 76.3%, 48%);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

.input::placeholder, .select option[disabled] {
    color: hsl(215, 20.2%, 65.1%);
    opacity: 1;
}

select option {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 0.25rem 0.5rem;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.clear-button {
    background: transparent;
    border: none;
    color: #60a5fa;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem;
    display: none;
    flex-shrink: 0;
}
.clear-button:hover {
    color: #93c5fd;
}

.input:disabled, .select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: rgba(15, 23, 42, 0.4);
    box-shadow: none;
}

.button-group {
    display: flex;
}

.button {
    background-color: #2563eb;
    color: white;
    border: 1px solid #60a5fa;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-family: "Chakra Petch", sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#clear-all.button {
    width: 100%;
}

.button:hover {
    background-color: #1d4ed8;
}

.button:active {
    transform: scale(0.96);
    background-color: #1e40af;
}

#clear-all.button {
    background-color: transparent;
    border-color: #60a5fa;
    color: #93c5fd;
}

#clear-all.button:hover {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: #93c5fd;
    color: #fff;
}

#clear-all.button:active {
    background-color: rgba(59, 130, 246, 0.25);
    border-color: #93c5fd;
    color: #fff;
}

.glow-button {
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.glow-button:hover {
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.7);
}

.glow-button:active {
     box-shadow: 0 0 6px rgba(37, 99, 235, 0.3);
}

.alert {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.alert-error {
    background-color: rgba(127, 29, 29, 0.6);
    border: 1px solid #ef4444;
    color: white;
}

.alert-icon {
    color: #f87171;
    font-size: 1rem;
    flex-shrink: 0;
}
.alert p {
    margin: 0;
    font-size: 0.875rem;
}

.card {
    background-color: rgba(3, 7, 18, 0.85);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: hsl(210, 40%, 98%);
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-header {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}

.card-title {
    color: #60a5fa;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
}

.placeholder-text {
    text-align: center;
    color: #93c5fd;
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-size: 1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.results-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-label {
    color: #93c5fd;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(210, 40%, 98%);
    word-break: break-word;
}

/* === Footer === */
.site-footer {
    width: 100%;
    margin-top: auto;
    text-align: center;
    padding: 0 0 2rem 0;
    font-size: 1rem;
    color: #fff;
}


::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.8);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

#floating-audio-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#play-pause-button {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.6);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

#play-pause-button:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.7);
}

#play-pause-button:active {
    transform: scale(0.94);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

#play-pause-button span {
   display: inline-block;
}

@media (min-width: 768.01px) {
    .main-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .title {
        font-size: 2.5rem;
        line-height: 1;
    }

    .container {
        padding: 2rem 1rem 0 1rem;
    }

    #clear-all.button {
        margin-top: 25px;
        padding: 10.5px;
    }

    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer{
        padding: 0 1rem 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
     .title {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }

     .description {
        font-size: 0.875rem;
    }

    .container {
        padding: 2rem 1rem 2rem 1rem;
    }

    .site-footer{
        padding: 0 1rem 2rem 1rem;
    }
}