body {
    font-family: verdana, arial, sans-serif;
    font-size: 12px;
    user-select: none;
    margin: 0;
    padding: 0;
    background: #eceff1;
}

.stationBlock span, .stationBlock {
    font-family: verdana, arial, sans-serif;
    font-size: 13px;
}

/* BOÎTES TALKERS */
#talkersContainer > div {
    max-height: 35vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    font-size: 13px;
    padding: 5px 5px;
    margin-bottom: 3px;
    background: #ffffff;
}

#uptimeCircle {
    position: absolute;
    left: 1%;
    top: calc(8% + 500px);
    width: 170px;
    height: 48px;
    border-radius: 10px;
    padding: 6px 10px;
    background-color: #263238;
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffffff;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    line-height: 1.3;
    box-sizing: border-box;
    z-index: 15;
    user-select: none;
    cursor: default;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    white-space: normal;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

#talkerBoxRedDark, #talkerBoxBlack, #talkerBoxRedBright, #talkerBoxDefault {
    background-color: #ffffff;
    color: #222;
    border: 1px solid #ccc;
}

.stationBlock {
    padding: 3px 6px;
    border-radius: 6px;
    margin-bottom: 4px;
    min-width: 150px;
    border: 2px solid #ccc;
    cursor: default;
    background: #f7f7f7;
}

.stationRE { background-color: #FF6600 !important; color: white !important; }
.stationGW { background-color: #3333FF !important; color: white !important; }
.stationTG62 { background-color: #000033 !important; color: white !important; }
.stationSSTV { background-color: #212121 !important; color: white !important; }
.stationGSM { background-color: #808080 !important; color: white !important; }

/* GRILLE MODERNE */
.modern-station {
    border-radius: 15px;
    padding: 4px 8px;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    height: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: default;
}

.modern-station::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
}

.station-callsign {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
    line-height: 1.1;
    flex-shrink: 0;
}

.station-name {
    font-size: 11px;
    opacity: 0.95;
    font-weight: 500;
    line-height: 1.1;
    margin-top: 0;
    flex-shrink: 0;
}

.ptt-timer {
    font-size: 9px;
    font-weight: 700;
    margin-top: 2px;
    background: rgba(0,0,0,0.25);
    padding: 1px 5px;
    border-radius: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    flex-shrink: 0;
}

.station-talker {
    animation: pulse-modern 1.5s infinite;
    border-color: rgba(244,67,54,0.8) !important;
    transform: translateY(-1px) scale(1.03);
}

.station-re { border-color: rgba(255,153,0,0.9) !important; }
.station-gw { border-color: rgba(61,125,245,0.9) !important; }
.station-sstv { border-color: rgba(0,0,0,0.9) !important; }

@keyframes pulse-modern {
    0% { box-shadow: 0 0 0 0 rgba(244,67,54,0.6); }
    50% { box-shadow: 0 0 0 12px rgba(244,67,54,0); }
    100% { box-shadow: 0 0 0 0 rgba(244,67,54,0); }
}

.modern-station:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.25);
}

/* LAYOUT PRINCIPAL */
.fieldset-main {
    width: 850px;
    border: rgb(66, 66, 66) 2px groove;
    box-shadow: 5px 5px 20px rgb(66, 66, 66);
    background-color: #f1f1f1;
    margin: 0 auto;
    border-radius: 10px;
}

legend { font-weight: bold; }

.container-main {
    position: relative;
    width: 850px;
    height: 650px;
    background-image: linear-gradient(to bottom, #e9e9e9 40%, #bcbaba 100%);
    border-radius: 10px;
    border: 1px solid #D3D3D3;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#bigCircle {
    position: absolute;
    left: 50%;
    top: 10%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 110px;
    border-radius: 18px;
    background: linear-gradient(135deg, #283593, #3949ab);
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 14px;
    text-align: center;
    word-break: break-word;
    white-space: normal;
    z-index: 5;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(40,53,147,0.4);
}

@keyframes clignote {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

.clignotant {
    animation: clignote 1.5s infinite;
    color: #FF4500 !important;
    text-shadow: 0 0 5px rgba(255, 69, 0, 0.7);
}

#bigCircle > div {
    padding: 8px;
    line-height: 1.3;
}

#talkersContainer {
    position: absolute;
    left: 10px;
    top: 10px;
    display: flex;
    flex-direction: column;
    z-index: 20;
}

#modernGrid {
    position: absolute;
    width: 690px;
	/* Origine */
	/* height: 450px; */
    height: 500px;
    left: 40px;
	/* Origine */
    /*top: 200px;*/
	top: 140px;
    display: grid;
	/* Origine */
    /*grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	*/
	grid-template-columns: repeat(7, 1fr);
    gap: 6px 6px;
    z-index: 8;
    overflow-y: auto;
    padding: 6px;
    margin: 0 !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

#typeCountersContainer {
    position: absolute;
    top: 20%;
    left: 90%;
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

#typeCountersContainer .typeCounter {
    font-family: Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: bold !important;
    color: white !important;
    text-align: center;
    line-height: 1.2;
    width: 75px;
    height: 75px;
    border-radius: 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(0,0,0,0.7);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    cursor: default;
    padding: 4px 0;
    box-sizing: border-box;
    user-select: none;
}

.circleLabel {
    font-size: 11px;
    margin-bottom: 2px;
}

.circleNumber {
    font-size: 18px;
    font-weight: bold;
}

.typeNormal { background-color: #000033; }
.typeRE { background-color: #FF6600; }
.typeGW { background-color: #3333FF; }
.typeGSM { background-color: #808080; }
.typePR { background-color: #00AA88; }
.typeTotal { background-color: #F44336 !important; }

#lastConnectionsFooter {
    position: absolute;
    top: 3px;
    right: 5px;
    background: #455A64;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    max-width: 440px;
    z-index: 20;
    color: white;
    font-weight: bold;
    font-family: Arial, sans-serif;
    box-shadow: 0 0 10px rgba(69, 90, 100, 0.6);
    user-select: none;
    cursor: default;
}

@media only screen and (max-width: 600px) {
    #talkersContainer > div {
        min-width: 120px;
        max-width: 180px;
        font-size: 11px !important;
        padding: 6px !important;
        margin-bottom: 15px !important;
    }
    #lastConnectionsFooter {
        font-size: 12px !important;
        padding: 6px 10px !important;
        max-width: 90%;
    }
    #modernGrid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 4px;
    }
}
