* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    background-color: #1e2741;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px;
    font-family: Arial, sans-serif;
}

@media (min-width: 768px) {
    .container {
        padding: 20px;
    }
}

.section {
    margin-top: 5px;
    margin-bottom: 5px;
    text-align: center;
}

@media (min-width: 768px) {
    .section {
        margin-bottom: 30px;
        padding: 20px;
    }
}

h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: #dddddd;
}

h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: #dddddd;
}

h4 {
    margin: 0 0 5px 0;
    font-size: 1.0rem;
    color: #dddddd;
}

.color-pickers {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .color-pickers {
        flex-direction: row;
        justify-content: space-around;
        align-items: flex-start;
    }
}

.color-picker-container {
    width: 100%;
    max-width: 150px;
    text-align: center;
    display: block;
}

.color-picker {
    margin: 0 auto;
    touch-action: none;
}

.color-picker-selector-l {
    display: flex;
    justify-content: left;
    flex-wrap: wrap;
    gap: 10px;
}

.color-picker-selector-r {
    display: flex;
    justify-content: right;
    flex-wrap: wrap;
    gap: 10px;
}

.input-group {
    margin-bottom: 5px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    max-width: 300px;
    padding: 5px;
    border: 1px solid #c0c0c0;
    border-radius: 8px;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    background-color: #dddddd;
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.input-grid-pair {
    display: grid;
    grid-template-columns: auto auto;
    gap: 10px;
}

.input-grid-solo {
    display: grid;
    grid-template-columns: auto;
    gap: 10px;
}

.button-grid {
    display: grid;
    grid-template-columns: auto auto auto auto;
    gap: 10px;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .button-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.button-single {
    display: grid;
    grid-template-columns: minmax(120px, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.control-button {
    width: 100%;
    padding: 10px;
    background-color: #a51da5c0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
    -webkit-appearance: none;
    appearance: none;
}

.control-button:active {
    background-color: #1ea51d;
    transform: translateY(1px);
}

@media (hover: hover) {
    .control-button:hover {
        background-color: #0056b3;
    }
}

.control-button-on {
    padding: 10px;
    background-color: #1ea51d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: background-color 0.3s;
}

.control-button-on:hover {
    background-color: #1e8701;
}

.status-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    z-index: 1000;
    opacity: 0.95;
}

.status-message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.status-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.auth-status {
    background-color: #f8f9fa;
    text-align: center;
    visibility: hidden;
    display: grid;
    grid-template-columns: auto;
}

.auth-button {
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    -webkit-appearance: none;
    appearance: none;
    visibility: hidden;
    text-align: center;
}

.auth-message {
    display: block;
    color: #666;
    visibility: hidden;
}


.c-container{
    height: 250px;
    display: flex;
    justify-content: center;
    vertical-align: middle;
  }
.c-side {
    height: 145px;
    width: 145px;
    line-height: 90px;
    position: absolute;
    text-align: center;
  }
.c-top {
    height: 126px;
    width: 126px;
    line-height: 90px;
    align-items: center;
    border-style: solid;
    border-width: thin;
    background-color: #191919;
    transform: rotate(-45deg) skew(30deg, 30deg) translate(20%, -20%);    
}
.c-left {
    border-style: solid;
    border-width: thin;
    background-color: transparent;
    transform: rotate(15deg) skew(15deg, 0deg) translate(-51%, 63%);
}
.c-right {
    border-style: solid;
    border-width: thin;
    background-color: transparent;
    transform: rotate(-15deg) skew(-15deg, 0deg) translate(51%, 63%);
}

.drop-container {
    height: 240px;
    display: flex;
    justify-content: center;
    vertical-align: middle;
}

.color-container {
    width: 94px;
    height: 156px;
    background-color: #1e2741;
    position: absolute;
    top: 2px;
    left: 2px;
  }
  
#drop-color-button {
    width: 98px;
    height: 160px;
    background-image: url('imgs/droplet_small.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
  }

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
}

.countdown-circle {
    position: relative;
    width: 240px;
    height: 240px;
}

.countdown-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
    position: relative;
}

.countdown-bg {
    fill: none;
    stroke: #2a3040;
    stroke-width: 5;
}

.countdown-progress {
    fill: none;
    stroke: #d8d8d8;
    stroke-width: 5;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s linear;
}

.wiggle {
    width: 98px;
    height: 160px;
    position: absolute;
    animation-name: wiggle;
    animation-duration: 4s;
    animation-iteration-count: infinite;
}

@keyframes wiggle {
    0% { transform: rotate(5deg); }
    50% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}
