/* 개인 홈페이지 스타일 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #010409;
    min-height: 100vh;
    color: #e8eaed;
    overflow-y: auto;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 12px;
    min-height: 100vh;
    grid-template-rows: auto auto auto auto;
}

.widget {
    background: rgba(61, 72, 86, 0.95);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(61, 72, 86, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #e8eaed;
    overflow: hidden;
}

.widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(77, 89, 106, 0.6);
}

.header {
    grid-column: 1 / -1;
    text-align: center;
    background: rgba(61, 72, 86, 0.3);
    color: #e8eaed;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(77, 89, 106, 0.3);
}

.header h1 {
    font-size: 1.5em;
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 검색 위젯 */
.search-widget {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    position: relative;
    flex: 1;
}

.search-box {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 1px solid rgba(61, 72, 86, 0.5);
    border-radius: 50px;
    font-size: 16px;
    background: rgba(45, 53, 64, 0.8);
    color: #e8eaed;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-box:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(77, 89, 106, 0.4);
    background: rgba(61, 72, 86, 0.9);
    border-color: rgba(77, 89, 106, 0.8);
}

.search-box::placeholder {
    color: rgba(232, 234, 237, 0.6);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #4d596a;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #e8eaed;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #5d6976;
}

/* 퀵링크 위젯 */
.quicklinks-widget {
    grid-column: 1 / -1;
    min-height: auto;
}

.quicklinks-widget h3 {
    margin-bottom: 8px;
    font-size: 1em;
}

.quicklinks {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 8px;
    align-content: start;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: linear-gradient(135deg, #4d596a 0%, #3d4856 100%);
    color: #e8eaed;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 10px;
    text-align: center;
    min-height: 55px;
    justify-content: center;
    border: 1px solid rgba(61, 72, 86, 0.3);
}

.quick-link:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #5d6976 0%, #4d596a 100%);
    border-color: rgba(77, 89, 106, 0.5);
}

.quick-link-icon {
    font-size: 18px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-link-icon svg {
    color: #e8eaed;
}

.add-link {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
    border: 2px dashed #999;
    cursor: pointer;
    opacity: 0.8;
}

.add-link:hover {
    opacity: 1;
    border-color: #666;
}

/* 구글 캘린더 위젯 */
.google-calendar-widget {
    grid-column: 1 / -1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.google-calendar-widget h3 {
    margin-bottom: 8px;
    font-size: 1em;
}

.google-calendar-widget iframe {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    border: 1px solid rgba(61, 72, 86, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background: #2d3540;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .google-calendar-widget {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 8px;
        grid-gap: 8px;
        grid-template-rows: auto auto auto auto;
    }

    .search-widget {
        flex-direction: column;
        gap: 8px;
    }

    .header h1 {
        font-size: 1.3em;
    }

    .header {
        padding: 10px;
        margin-bottom: 5px;
    }

    .quicklinks {
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
    }

    .quick-link {
        min-height: 50px;
        padding: 6px 2px;
        font-size: 9px;
    }

    .quick-link-icon {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .google-calendar-widget iframe {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .quicklinks {
        grid-template-columns: repeat(3, 1fr);
    }

    .search-widget {
        text-align: center;
    }

    .header h1 {
        font-size: 1.2em;
    }

    .quick-link {
        min-height: 55px;
        font-size: 10px;
    }

    .quick-link-icon {
        font-size: 16px;
    }

    .google-calendar-widget iframe {
        height: 250px;
    }
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget {
    animation: fadeInUp 0.6s ease-out;
}

.widget:nth-child(1) {
    animation-delay: 0.1s;
}

.widget:nth-child(2) {
    animation-delay: 0.2s;
}

.widget:nth-child(3) {
    animation-delay: 0.3s;
}

.widget:nth-child(4) {
    animation-delay: 0.4s;
}

.widget:nth-child(5) {
    animation-delay: 0.5s;
}
