/******************************************************************************
    Icecast Modernized CSS
    - Responsive Design
    - Flexbox Layout
    - Improved Readability
******************************************************************************/

/* 기본 초기화 */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

body {
    font-family: 'Verdana', sans-serif;
    line-height: 1.6;
    background-color: #121212; /* 완전한 블랙보다 부드러운 다크 그레이 */
    color: #eee;
    padding: 0 15px; /* 모바일 양옆 여백 */
}

/* 메인 컨테이너 - 데스크탑에서 너무 넓어지지 않게 제한 */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 상단 네비게이션 */
.xiphnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 1em;
    background: #222;
    border-bottom: 2px solid #f8ef64;
    margin-bottom: 1.5em;
}

.xiphnav_a {
    text-decoration: none;
    color: #ccc;
    font-size: 0.9em;
    transition: color 0.3s;
}

.xiphnav_a:hover {
    color: #f8ef64;
}

/* 헤더 - 로고와 제목 */
h2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem); /* 화면 크기에 따라 폰트 조절 */
    font-weight: bold;
    color: #fff;
    padding: 20px 0 20px 60px;
    margin: 0.5em 0;
    background: transparent url(/icecast.png) no-repeat scroll left center;
    background-size: 50px; /* 로고 크기 최적화 */
}

/* 네비게이션 링크 */
.nav {
    display: inline-block;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    color: #fff;
    transition: 0.3s;
}

.nav:hover {
    color: #f8ef64;
    transform: translateY(-2px);
}

/* 콘텐츠 박스 (뉴스 및 스트림) */
.roundcont {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    background-color: #2a2a2a;
    border-radius: 12px; /* 둥근 모서리 현대화 */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.newscontent {
    padding: 20px;
}

h3, h4 {
    margin: 0 0 15px 0;
    font-weight: bold;
    color: #f8ef64;
}

.newscontent h3 {
    font-size: 1.4em;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.newscontent p {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #ddd;
}

/* 스트림 테이블 레이아웃 개선 */
.streamheader table {
    width: 100%;
    border-collapse: collapse;
}

.streamheader td {
    padding: 15px 10px;
    border-bottom: 1px solid #333;
}

/* 버튼 스타일링 (Tune In 링크) */
.streamheader a {
    display: inline-block;
    padding: 8px 16px 8px 35px;
    text-decoration: none;
    background: #444 url("/tunein.png") no-repeat 10px center;
    background-size: 18px;
    color: #f8ef64;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.3s;
}

.streamheader a:hover {
    background-color: #555;
    color: #fff;
}

/* 반응형 미디어 쿼리 */
@media (max-width: 768px) {
    body {
        padding: 0 10px;
    }

    h2 {
        padding-left: 55px;
        background-size: 45px;
    }

    .streamheader td {
        display: block; /* 모바일에서는 테이블 칸을 세로로 나열 */
        width: 100%;
        text-align: left;
    }
    
    .roundcont {
        width: 100%;
    }
}


/* 추가된 현대적 스타일 */
.stream-details {
    display: grid;
    grid-template-columns: 150px 1fr; /* 이름과 값의 구분 */
    gap: 10px;
}

@media (max-width: 600px) {
    .stream-details {
        grid-template-columns: 1fr; /* 모바일에서는 세로로 한 줄씩 */
    }
}

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

.login-form input {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #333;
    color: #fff;
}

.song-title {
    font-weight: bold;
    color: #f8ef64;
}


/* 그리드 기반 데이터 레이아웃 */
.stream-details {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 15px;
    align-items: center;
}

.stream-details dt {
    font-weight: bold;
    color: #aaa;
    font-size: 0.9em;
}

.stream-details dd {
    margin: 0;
    color: #f8ef64;
}

/* 링크 버튼 그리드 */
.link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.nav2 {
    display: inline-block;
    padding: 8px 15px;
    background: #444;
    color: #f8ef64;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: 0.3s;
}

.nav2:hover {
    background: #f8ef64;
    color: #000;
}

/* 폼 스타일 개선 */
.login-form {
    display: flex;
    flex-direction: column;
    max-width: 300px;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85em;
    color: #ccc;
}