body,html {
    min-width: 120px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    min-height: 100%;
    margin: 0;
    padding: 32px 0 0 0;
    background: #505050;
    background-attachment: fixed;
    color: #e0e0e0;
}

#wrapper {
    background: #606060;
    position: relative;
    min-width: 120px;
    max-width: 650px;
    margin: 0px auto;
    padding: 32px;
    content-align: center;
    border-radius: 0;
    border: 2px solid #777;
    border-top: 2px solid #888;
    border-left: 2px solid #888;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.1),
        inset -1px -1px 0 rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.3);
}


h1 {
    padding: 16px 24px;
    margin: 0px auto 20px auto;
    font-style: normal;
    font-weight: 900;
    font-size: 2.8rem;
    font-family: Impact, 'Arial Black', 'Franklin Gothic Bold', sans-serif;
    color: #ff6600;
    text-align: center;
    text-shadow: 
        2px 2px 0 #000000,
        4px 4px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 4px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #ff6600;
    border-radius: 8px;
    display: inline-block;
    position: relative;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 102, 0, 0.3);
}

.copy {
    font-weight: 400;
    font-size: 1.3rem;
    line-height: 1.6;
    color: #f0f0f0;
    text-align: left;
    margin-bottom: 2rem;
    padding: 0 16px;
    border-left: 3px solid #777;
    border-right: 3px solid #777;
    background: rgba(96, 96, 96, 0.3);
    padding: 16px;
}

#display {
    margin: 0px 10px;
    line-height: 1.8;
    padding: 20px 0;
}

.cost {
    font-size: 28px;
    color: #ff6600;
    font-weight: 600;
    text-shadow: 
        1px 1px 0 #cc3300,
        0 0 10px rgba(255, 102, 0, 0.4);
    background: linear-gradient(180deg, #ff8833 0%, #ff6600 50%, #cc3300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bigCost {
    font-size: 48px;
    align: right;
}


#totalTime {
    background: inherit;
    font-size: 28px;
    text-align: center;
    width: 50%;
}

input[type=number] {
    width: 100px;
}

.subHeading {
    margin: 16px;
    line-height: 1.8;
    color: #f0f0f0;
    text-align: center;
    background: rgba(96, 96, 96, 0.3);
    border: 1px solid #666;
    border-top: 1px solid #777;
    border-left: 1px solid #777;
    padding: 8px;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    opacity: 1;
}


.control {
    font-size: larger;
    padding: 8px;
    margin: 12px;
    min-width: 200px;
}

.button {
   font-size: larger;
   padding: 8px;
   min-width: 200px;
}

.center {
    margin: auto;
    display: block;
}

.status-button {
    padding: 24px;
    min-height: 120px;
    width: 380px;
    max-width: 380px;
    border: none;
    border-radius: 0;
    background: #707070;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 2px 2px 0 #909090,
        inset -2px -2px 0 #505050,
        0 2px 4px rgba(0, 0, 0, 0.3);
    border-top: 2px solid #aaa;
    border-left: 2px solid #aaa;
    border-right: 2px solid #555;
    border-bottom: 2px solid #555;
}

.status-button:hover {
    background: #808080;
    box-shadow:
        inset 2px 2px 0 #a0a0a0,
        inset -2px -2px 0 #606060,
        0 3px 6px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.status-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #606060;
    box-shadow:
        inset 1px 1px 0 #808080,
        inset -1px -1px 0 #404040,
        0 1px 2px rgba(0, 0, 0, 0.2);
}

.button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.button-text {
    font-size: 28px;
    font-weight: 700;
    color: #f0f0f0;
    text-shadow: 
        1px 1px 0 #000000,
        2px 2px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.status-text {
    font-size: 15px;
    color: #ffffff;
    text-align: center;
    font-weight: 400;
    letter-spacing: 1px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

/* State-specific button styling */
.status-button.recording {
    box-shadow:
        inset 2px 2px 0 #808080,
        inset -2px -2px 0 #202020,
        inset 4px 4px 0 rgba(255, 255, 255, 0.1),
        inset -4px -4px 0 rgba(0, 0, 0, 0.3),
        0 6px 12px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 0, 0, 0.4);
    border-top: 2px solid #ff6666;
    border-left: 2px solid #ff6666;
    border-right: 2px solid #660000;
    border-bottom: 2px solid #660000;
}

.status-button.recording .button-text {
    color: #ffcccc;
    animation: pulse-recording 2s infinite;
    text-shadow: 
        1px 1px 0 #660000,
        0 0 10px rgba(255, 0, 0, 0.6);
}

.status-button.playing {
    box-shadow:
        inset 2px 2px 0 #808080,
        inset -2px -2px 0 #202020,
        inset 4px 4px 0 rgba(255, 255, 255, 0.1),
        inset -4px -4px 0 rgba(0, 0, 0, 0.3),
        0 6px 12px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 255, 0, 0.3);
    border-top: 2px solid #66ff66;
    border-left: 2px solid #66ff66;
    border-right: 2px solid #006600;
    border-bottom: 2px solid #006600;
}

.status-button.playing .button-text {
    color: #ccffcc;
    animation: pulse-playing 1.5s infinite;
    text-shadow: 
        1px 1px 0 #006600,
        0 0 10px rgba(0, 255, 0, 0.6);
}

@keyframes pulse-recording {
    0%, 100% { 
        text-shadow: 
            1px 1px 0 #660000,
            0 0 10px rgba(255, 0, 0, 0.6),
            0 0 20px rgba(255, 0, 0, 0.3);
    }
    50% { 
        text-shadow: 
            1px 1px 0 #660000,
            0 0 15px rgba(255, 0, 0, 0.8),
            0 0 30px rgba(255, 0, 0, 0.5);
    }
}

@keyframes pulse-playing {
    0%, 100% { 
        text-shadow: 
            1px 1px 0 #006600,
            0 0 10px rgba(0, 255, 0, 0.6),
            0 0 20px rgba(0, 255, 0, 0.3);
    }
    50% { 
        text-shadow: 
            1px 1px 0 #006600,
            0 0 15px rgba(0, 255, 0, 0.8),
            0 0 30px rgba(0, 255, 0, 0.5);
    }
}

/* Volume meter styling */
.button-content-with-meter {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.volume-meter {
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 60px;
    justify-content: flex-end;
    align-items: center;
    background: #505050;
    border: 2px solid #777;
    border-top: 2px solid #888;
    border-left: 2px solid #888;
    padding: 4px 6px;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.1),
        inset -1px -1px 0 rgba(0, 0, 0, 0.3);
}

.volume-segment {
    width: 12px;
    height: 6px;
    border-radius: 0;
    transition: all 0.1s ease;
    border: 1px solid #333;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.05),
        inset -1px -1px 0 rgba(0, 0, 0, 0.3);
}

/* Green segments (bottom 2) */
.volume-segment.green.dimmed {
    background: linear-gradient(180deg, #003300 0%, #001a00 100%);
    border-top: 1px solid #004d00;
    border-left: 1px solid #004d00;
    border-right: 1px solid #001100;
    border-bottom: 1px solid #001100;
}

.volume-segment.green.active {
    background: linear-gradient(180deg, #00cc00 0%, #008800 50%, #004400 100%);
    border-top: 1px solid #00ff00;
    border-left: 1px solid #00ff00;
    border-right: 1px solid #002200;
    border-bottom: 1px solid #002200;
    box-shadow: 
        inset 1px 1px 0 rgba(0, 255, 0, 0.3),
        0 0 8px rgba(0, 204, 0, 0.6);
}

/* Yellow segments (middle 2) */
.volume-segment.yellow.dimmed {
    background: linear-gradient(180deg, #332200 0%, #1a1100 100%);
    border-top: 1px solid #4d3300;
    border-left: 1px solid #4d3300;
    border-right: 1px solid #110800;
    border-bottom: 1px solid #110800;
}

.volume-segment.yellow.active {
    background: linear-gradient(180deg, #ffcc00 0%, #cc8800 50%, #664400 100%);
    border-top: 1px solid #ffff00;
    border-left: 1px solid #ffff00;
    border-right: 1px solid #332200;
    border-bottom: 1px solid #332200;
    box-shadow: 
        inset 1px 1px 0 rgba(255, 255, 0, 0.3),
        0 0 8px rgba(255, 204, 0, 0.6);
}

/* Red segments (top 2) */
.volume-segment.red.dimmed {
    background: linear-gradient(180deg, #330000 0%, #1a0000 100%);
    border-top: 1px solid #4d0000;
    border-left: 1px solid #4d0000;
    border-right: 1px solid #110000;
    border-bottom: 1px solid #110000;
}

.volume-segment.red.active {
    background: linear-gradient(180deg, #ff0000 0%, #cc0000 50%, #660000 100%);
    border-top: 1px solid #ff3333;
    border-left: 1px solid #ff3333;
    border-right: 1px solid #220000;
    border-bottom: 1px solid #220000;
    box-shadow: 
        inset 1px 1px 0 rgba(255, 0, 0, 0.3),
        0 0 8px rgba(255, 0, 0, 0.6);
}

/* Volume indicator styling */
.subHeading small {
    color: #d0d0d0;
    font-size: 13px;
    line-height: 1.5;
}

/* Error message styling */
.subHeading[style*="color: red"] {
    color: #ff9999 !important;
    background: #554444;
    border: 2px solid #888000;
    border-top: 2px solid #aa0000;
    border-left: 2px solid #aa0000;
    border-radius: 0;
    padding: 12px;
    margin: 16px auto;
    max-width: 400px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    letter-spacing: 1px;
    box-shadow:
        inset 1px 1px 0 rgba(255, 0, 0, 0.1),
        inset -1px -1px 0 rgba(0, 0, 0, 0.2),
        0 0 5px rgba(255, 0, 0, 0.2);
}

/* Silence controls styling */
.silence-controls {
    margin-top: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #656565;
    border: 2px solid #777;
    border-top: 2px solid #888;
    border-left: 2px solid #888;
    padding: 20px;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.1),
        inset -1px -1px 0 rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.silence-threshold-control,
.silence-duration-control {
    padding: 16px;
    background: #555555;
    border: 2px solid #666;
    border-top: 2px solid #777;
    border-left: 2px solid #777;
    border-radius: 0;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.05),
        inset -1px -1px 0 rgba(0, 0, 0, 0.2);
}

.threshold-label {
    display: block;
    font-size: 14px;
    color: #f0f0f0;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 500;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.threshold-slider {
    width: 100%;
    height: 8px;
    background: #404040;
    border-radius: 0;
    outline: none;
    opacity: 1;
    transition: opacity 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #555;
    border-top: 1px solid #333;
    border-left: 1px solid #333;
    box-shadow:
        inset 1px 1px 2px rgba(0, 0, 0, 0.3),
        inset -1px -1px 0 rgba(255, 255, 255, 0.05);
}

.threshold-slider:hover {
    background: #505050;
    box-shadow:
        inset 1px 1px 2px rgba(0, 0, 0, 0.4),
        inset -1px -1px 0 rgba(255, 255, 255, 0.08),
        0 0 10px rgba(255, 102, 0, 0.2);
}

.threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: 
        linear-gradient(145deg, #808080 0%, #505050 50%, #303030 100%);
    border-radius: 0;
    cursor: pointer;
    border: 2px solid #999;
    border-top: 2px solid #bbb;
    border-left: 2px solid #bbb;
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.2),
        inset -1px -1px 0 rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.threshold-slider::-webkit-slider-thumb:hover {
    background: 
        linear-gradient(145deg, #909090 0%, #606060 50%, #404040 100%);
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.3),
        inset -1px -1px 0 rgba(0, 0, 0, 0.5),
        0 3px 6px rgba(0, 0, 0, 0.6),
        0 0 10px rgba(255, 102, 0, 0.4);
    transform: scale(1.05);
}

.threshold-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: 
        linear-gradient(145deg, #808080 0%, #505050 50%, #303030 100%);
    border-radius: 0;
    cursor: pointer;
    border: 2px solid #999;
    border-top: 2px solid #bbb;
    border-left: 2px solid #bbb;
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.2),
        inset -1px -1px 0 rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.threshold-slider::-moz-range-thumb:hover {
    background: 
        linear-gradient(145deg, #909090 0%, #606060 50%, #404040 100%);
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.3),
        inset -1px -1px 0 rgba(0, 0, 0, 0.5),
        0 3px 6px rgba(0, 0, 0, 0.6),
        0 0 10px rgba(255, 102, 0, 0.4);
    transform: scale(1.05);
}

/* Attribution footer styling */
.attribution-footer {
    text-align: center;
    margin-top: 32px;
    padding: 20px 32px;
    background: #484848;
    border-top: 3px solid #666;
    font-size: 14px;
    color: #d0d0d0;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    letter-spacing: 1px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 -2px 4px rgba(0, 0, 0, 0.2);
}

.attribution-footer a {
    color: #ff6600;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.attribution-footer a:hover {
    color: #ff8833;
    text-decoration: underline;
    text-shadow: 
        1px 1px 0 rgba(0, 0, 0, 0.5), 
        0 0 8px rgba(255, 102, 0, 0.4);
}

/* Resources section styling */
.resources-section {
    margin-top: 48px;
    padding: 32px;
    background: #585858;
    border: 2px solid #666;
    border-top: 2px solid #777;
    border-left: 2px solid #777;
    border-radius: 0;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.08),
        inset -1px -1px 0 rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.resources-section h2 {
    margin: 0 0 12px 0;
    font-size: 2rem;
    font-weight: 700;
    color: #f0f0f0;
    text-align: center;
    letter-spacing: 2px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    text-shadow: 
        1px 1px 0 #444,
        2px 2px 0 #222;
    border-bottom: 2px solid #555;
    padding-bottom: 8px;
}

.resources-section p {
    margin: 0 0 40px 0;
    color: #e0e0e0;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    background: rgba(80, 80, 80, 0.3);
    padding: 12px;
    border: 1px solid #666;
    border-top: 1px solid #777;
    border-left: 1px solid #777;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.resource-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #505050;
    border: 2px solid #666;
    border-top: 2px solid #777;
    border-left: 2px solid #777;
    border-radius: 0;
    padding: 14px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.05),
        inset -1px -1px 0 rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6600 0%, #cc3300 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resource-card:hover {
    background: #606060;
    border-top: 2px solid #888;
    border-left: 2px solid #888;
    border-right: 2px solid #444;
    border-bottom: 2px solid #444;
}

.resource-card:hover::before {
    opacity: 1;
}

.resource-card:active {
    transform: translateY(-2px);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.resource-card h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e0e0e0;
    line-height: 1.3;
    letter-spacing: 1px;
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.resource-author {
    font-size: 0.85rem;
    color: #ff6600;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: right;
    flex-shrink: 0;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.resource-description {
    margin: 0;
    font-size: 0.9rem;
    color: #e0e0e0;
    line-height: 1.5;
    font-weight: 400;
    text-align: center;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    background: rgba(64, 64, 64, 0.3);
    padding: 8px;
    border: 1px solid #555;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    margin-top: 8px;
}

a {
	color: #ff6600;
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
	transition: color 0.2s ease;
}

a:hover {
	color: #ff8833;
	text-shadow: 
		1px 1px 0 rgba(0, 0, 0, 0.5), 
		0 0 8px rgba(255, 102, 0, 0.4);
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .resources-section {
        margin-top: 40px;
        padding: 24px 16px;
    }

    .resources-section h2 {
        font-size: 1.75rem;
    }

    .resources-section p {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .resources-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .resource-card {
        padding: 12px;
        border-radius: 6px;
    }

    .resource-card h3 {
        font-size: 1rem;
    }

    .resource-author {
        font-size: 0.8rem;
    }

    .resource-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .resources-section {
        padding: 20px 12px;
        margin-top: 32px;
    }

    .resource-card {
        padding: 10px;
    }

    .resource-header {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
        margin-bottom: 6px;
    }

    .resource-author {
        text-align: left;
        font-size: 0.75rem;
    }

    .resources-grid {
        gap: 12px;
    }
}
