:root {
    --silver: #C2C2C2;

    --widget-shadow: 0px 2px 4px var(--silver);
    --widget-shadow-moved: 0px 4px 8px var(--silver);

    /*Colors/Gradients*/
    --header-gradient: linear-gradient(to right, #279AD3, #0074CC);

/*  Background Color*/
    --base-background: #f1f1f1;

    /*Progress for clock*/
    --progress: 0%;
}

/*Color changes for dark mode*/
:root.dark-mode {
    --widget-shadow: 0px 4px 4px #000;
    --widget-shadow-moved: 0px 8px 8px #000;

    /*Colors/Gradients*/
    --header-gradient: white;

    /*  Background Color*/
    --base-background: #555555;
}

/*Basic CSS types*/
body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    /*Get apple font*/
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

/*  Background*/
    background: var(--base-background);
}

h1 {
    margin-top: 50px;
    margin-bottom: 50px;

    background: var(--header-gradient);

    /*Clip the background to just text*/
    -webkit-background-clip: text;
    background-clip: text;

    /*Make the text transparent, so the background comes through*/
    -webkit-text-fill-color: transparent;
}

h2 {
    background: var(--header-gradient);

    /*Clip the background to just text*/
    -webkit-background-clip: text;
    background-clip: text;

    /*Make the text transparent, so the background comes through*/
    -webkit-text-fill-color: transparent;

    font-size: 20px
}


input {
    border: none;
    font-size: 20px;
    padding: 10px;
    background: #F2F2F2;
    border-radius: 10px;
}

input:focus {
    border: none;
    outline: none;
    caret-color: gray;
}

/*Standard widget and different types*/
.widget {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background-color: white;
    padding: 20px;
    /*margin: 20px;*/
    box-shadow: var(--widget-shadow);
    justify-content: center;
    align-items: center;

/*  Animations*/
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.widget.small{

}

.widget.medium{
    grid-column: span 2;
    grid-row: span 1;
}

.widget.large{
    grid-column: span 2;
    grid-row: span 3;
}

.widget-container {
    /*Setup basic grid structure*/
    display: grid;
    grid-template-columns: 200px 200px 200px 200px;
    grid-template-rows: 200px 200px 200px;
    gap: 20px;
}

.widget:hover {
    box-shadow: var(--widget-shadow-moved);
    transform: TranslateY(-2px)
}

/*Dark mode button*/
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
}

/*Clock widget*/
#clock-widget {
    position: relative;
    /*z-index: -1;*/
}

#clock-widget.first {
    background: conic-gradient(
            from 0deg,
            transparent 0% var(--progress),
            white var(--progress) 100%),
            var(--header-gradient);
}

#clock-widget.second {
    background: conic-gradient(
            from 0deg,
            white 0% var(--progress),
            transparent var(--progress) 100%),
    var(--header-gradient);
}

.widget.small.clock {
    font-weight: bolder;
    font-size: 60px;
    background: var(--header-gradient);
}

.widget.small.clock p.first {
    background: conic-gradient(
            from 0deg,
            white 0% var(--progress),
            black var(--progress) 100%
    );

    /*Clip the background to just text*/
    -webkit-background-clip: text;
    background-clip: text;

    /*Make the text transparent, so the background comes through*/
    -webkit-text-fill-color: transparent;
}

.widget.small.clock p.second {
    background: conic-gradient(
            from 0deg,
            black 0% var(--progress),
            white var(--progress) 100%
    );

    /*Clip the background to just text*/
    -webkit-background-clip: text;
    background-clip: text;

    /*Make the text transparent, so the background comes through*/
    -webkit-text-fill-color: transparent;
}

/*Bookmark widget*/
#bookmarks-widget {
    /*Setup basic grid structure*/
    display: flex;
    justify-content: flex-start;


}

#bookmarks-widget .title {
    font-size: 30px;
    font-weight: bold;
    margin: 5px;

    background: var(--header-gradient);

    /*Clip the background to just text*/
    -webkit-background-clip: text;
    background-clip: text;

    /*Make the text transparent, so the background comes through*/
    -webkit-text-fill-color: transparent;

}

#bookmarks-widget .bookmark{
    text-decoration: none;
    color: inherit;
    flex-direction: row;
    justify-content: space-around;


    /*Setup basic grid structure*/
    min-width: 90%;
    min-height: 40px;
    margin: 5px;
    padding: 0;
}

#bookmarks-widget .bookmark p {
    /*Change the font*/
    font-size: 30px;
    font-weight: bold;

    background: white;

    /*Clip the background to just text*/
    -webkit-background-clip: text;
    background-clip: text;

    /*Make the text transparent, so the background comes through*/
    -webkit-text-fill-color: transparent;
}

/*Blank widget*/
.widget.empty{
    background: transparent;
    box-shadow: none;
}

/*Settings widget*/
.settings {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 0 0;
}

.settings:hover {
    box-shadow: 0 0 0 0;
    transform: TranslateY(0);
}

.settings-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;

}

.settings-overlay.active {
    opacity: 1;
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#open-settings {
    position: fixed;
    top: 20px;
    right: 20px;
}

#open-settings::before {
    content: "⚙";
    font-size: 24px;
}

#settings-form {
    display: flex;
    flex-direction: column;
    justify-content: center;

}

/*Search widget*/
#search-text {
    border: none;
    font-size: 20px;
    padding: 10px;
    background: #F2F2F2;
    border-radius: 10px;
}

/*Position Classes*/
.pos-1-1 { grid-column-start: 1; grid-row-start: 1; }
.pos-1-2 { grid-column-start: 1; grid-row-start: 2; }
.pos-1-3 { grid-column-start: 1; grid-row-start: 3; }
.pos-1-4 { grid-column-start: 1; grid-row-start: 4; }

.pos-2-1 { grid-column-start: 2; grid-row-start: 1; }
.pos-2-2 { grid-column-start: 2; grid-row-start: 2; }
.pos-2-3 { grid-column-start: 2; grid-row-start: 3; }
.pos-2-4 { grid-column-start: 2; grid-row-start: 4; }

.pos-3-1 { grid-column-start: 3; grid-row-start: 1; }
.pos-3-2 { grid-column-start: 3; grid-row-start: 2; }
.pos-3-3 { grid-column-start: 3; grid-row-start: 3; }
.pos-3-4 { grid-column-start: 3; grid-row-start: 4; }